[libpostgresql-jdbc-java] 10/13: Don't return quotes around identifiers in the results of DatabaseMetaData.getIndexInfo even if they would require quoting in SQL. The code was making a "col = NULL" comparison which doesn't work.

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


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

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

commit 393d899459fc8fd1e85f1bd232f06d305494f870
Author: Kris Jurka <books at ejurka.com>
Date:   Mon Jul 23 17:30:52 2007 +0000

    Don't return quotes around identifiers in the results of
    DatabaseMetaData.getIndexInfo even if they would require quoting
    in SQL.  The code was making a "col = NULL" comparison which doesn't
    work.
    
    Reported by Andrei Badea.
---
 org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java b/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
index 353c22f..6d59c84 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
@@ -3,7 +3,7 @@
 * Copyright (c) 2004-2005, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
-*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java,v 1.24.2.3 2006/02/03 21:10:29 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java,v 1.24.2.4 2007/07/15 15:10:18 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -3909,7 +3909,7 @@ public abstract class AbstractJdbc2DatabaseMetaData
 
         if( connection.haveMinimumServerVersion("7.4"))
         {
-            sql += " CASE i.indexprs WHEN null THEN a.attname ELSE pg_get_indexdef(ci.oid,a.attnum,false) END AS COLUMN_NAME, ";
+            sql += " CASE WHEN i.indexprs IS NULL THEN a.attname ELSE pg_get_indexdef(ci.oid,a.attnum,false) END AS COLUMN_NAME, ";
         }
         else
         {

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