[libpostgresql-jdbc-java] 11/15: Allow the driver to support setObject with Types.DISTINCT. We report metadata indicating that values are of this type, so we'd better accept it coming back in.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:20:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_4_703
in repository libpostgresql-jdbc-java.

commit a5a763bc2de570e838647108d196dfa5a9845991
Author: Kris Jurka <books at ejurka.com>
Date:   Sun Mar 20 00:58:45 2011 +0000

    Allow the driver to support setObject with Types.DISTINCT.
    We report metadata indicating that values are of this type, so
    we'd better accept it coming back in.
    
    Reported by Vitalii Tymchyshyn.
---
 org/postgresql/jdbc2/AbstractJdbc2Statement.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
index f6265b7..2b27412 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.2.1 2009/09/26 15:21:27 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.114.2.2 2010/05/01 16:08:00 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -1725,6 +1725,9 @@ public abstract class AbstractJdbc2Statement implements BaseStatement
                 else
                     throw new PSQLException(GT.tr("Cannot cast an instance of {0} to type {1}", new Object[]{in.getClass().getName(),"Types.ARRAY"}), PSQLState.INVALID_PARAMETER_TYPE);
                 break;
+            case Types.DISTINCT:
+                bindString(parameterIndex, in.toString(), Oid.UNSPECIFIED);
+                break;
 	        case Types.OTHER:
 	            if (in instanceof PGobject)
 	                setPGobject(parameterIndex, (PGobject)in);

-- 
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