[libpostgresql-jdbc-java] 03/08: When the driver asks the server to resolve a type the resolved type is stored in the SimpleQuery object. When the statement is executed again the driver determines whether the existing types match or if it needs to be reprepared by comparing the current Statement's settings with the SimpleQuery. The Statement will have the unspecified oid while the SimpleQuery will have the resolved oid, so there will not be a match and the statement will needlessly be reprepared. Allow an unspecified oid to match any resolved type.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL8_0_318
in repository libpostgresql-jdbc-java.
commit d0c252efd569115bd32bd2037a9e1a0dd2852366
Author: Kris Jurka <books at ejurka.com>
Date: Sun Aug 6 18:02:58 2006 +0000
When the driver asks the server to resolve a type the resolved type
is stored in the SimpleQuery object. When the statement is executed
again the driver determines whether the existing types match or if
it needs to be reprepared by comparing the current Statement's
settings with the SimpleQuery. The Statement will have the
unspecified oid while the SimpleQuery will have the resolved oid, so
there will not be a match and the statement will needlessly be
reprepared. Allow an unspecified oid to match any resolved type.
Reported by Akira Sato.
---
org/postgresql/core/v3/SimpleQuery.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/org/postgresql/core/v3/SimpleQuery.java b/org/postgresql/core/v3/SimpleQuery.java
index 789a307..b6828f4 100644
--- a/org/postgresql/core/v3/SimpleQuery.java
+++ b/org/postgresql/core/v3/SimpleQuery.java
@@ -4,7 +4,7 @@
* Copyright (c) 2004, Open Cloud Limited.
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/core/v3/SimpleQuery.java,v 1.8 2005/02/01 07:27:54 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/core/v3/SimpleQuery.java,v 1.8.2.1 2006/04/26 20:07:51 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -89,7 +89,7 @@ class SimpleQuery implements V3Query {
// Check for compatible types.
for (int i = 0; i < paramTypes.length; ++i)
- if (paramTypes[i] != preparedTypes[i])
+ if (paramTypes[i] != 0 && paramTypes[i] != preparedTypes[i])
return false;
return true;
--
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