[libpostgresql-jdbc-java] 17/22: When setNull is called with a TIME or TIMESTAMP type we cannot pass that type information on to the backend because we really don't know whether it is with or without a time zone. For a NULL value it doesn't matter, but we can't establish a type because a later call with a non-null value using the same PreparedStatement can potentially end up using a specific type that is incorrect.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:20:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL8_4_702
in repository libpostgresql-jdbc-java.
commit 36438050683834e042f71e8ea7a166d813a48e8b
Author: Kris Jurka <books at ejurka.com>
Date: Sat May 1 16:08:00 2010 +0000
When setNull is called with a TIME or TIMESTAMP type we cannot pass
that type information on to the backend because we really don't know
whether it is with or without a time zone. For a NULL value it
doesn't matter, but we can't establish a type because a later call
with a non-null value using the same PreparedStatement can
potentially end up using a specific type that is incorrect.
Per example from Martti Jeenicke
---
org/postgresql/jdbc2/AbstractJdbc2Statement.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
index 40cad0a..f6265b7 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
@@ -3,7 +3,7 @@
* Copyright (c) 2004-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.114 2009/05/27 23:55:19 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.114.2.1 2009/09/26 15:21:27 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1109,10 +1109,8 @@ public abstract class AbstractJdbc2Statement implements BaseStatement
oid = Oid.DATE;
break;
case Types.TIME:
- oid = Oid.TIME;
- break;
case Types.TIMESTAMP:
- oid = Oid.TIMESTAMPTZ;
+ oid = Oid.UNSPECIFIED;
break;
case Types.BIT:
oid = Oid.BOOL;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list