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

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

commit 83c9d2c3b2208daa2d535b72f859f0335744cb7a
Author: Barry Lind <[email protected]>
Date:   Mon Feb 24 16:38:25 2003 +0000

    Backport a fix from 7.4 to 7.3 to better handle case in updateable result 
sets.
    This backports part of the fix made in version 1.11.
    
     Modified Files:
      Tag: REL7_3_STABLE
        jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
---
 org/postgresql/jdbc2/AbstractJdbc2ResultSet.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java 
b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
index 6709e2f..a4794ba 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
@@ -1328,8 +1328,16 @@ public abstract class AbstractJdbc2ResultSet extends 
org.postgresql.jdbc1.Abstra
                else
                {
                        // otherwise go and get the primary keys and create a 
hashtable of keys
-                       java.sql.ResultSet rs = ((java.sql.Connection) 
connection).getMetaData().getPrimaryKeys("", "", tableName);
-
+                       // if the user has supplied a quoted table name
+                       // remove the quotes, but preserve the case.
+                       // otherwise fold to lower case.
+                       String quotelessTableName;
+                       if (tableName.startsWith("\"") && 
tableName.endsWith("\"")) {
+                               quotelessTableName = 
tableName.substring(1,tableName.length()-1);
+                       } else {
+                               quotelessTableName = tableName.toLowerCase();
+                       }
+                       java.sql.ResultSet rs = ((java.sql.Connection) 
connection).getMetaData().getPrimaryKeys("", "", quotelessTableName);
 
                        for (; rs.next(); i++ )
                        {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to