Index: src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v retrieving revision 1.10 diff -c -r1.10 AbstractJdbc2ResultSet.java *** src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java 2002/11/04 06:42:33 1.10 --- src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java 2002/12/11 21:21:53 *************** *** 1009,1015 **** { String column = (String) columns.nextElement(); ! updateSQL.append( column + "= ?"); if ( i < numColumns - 1 ) { --- 1009,1017 ---- { String column = (String) columns.nextElement(); ! updateSQL.append("\""); ! updateSQL.append( column ); ! updateSQL.append("\" = ?"); if ( i < numColumns - 1 ) { *************** *** 1026,1032 **** { PrimaryKey primaryKey = ((PrimaryKey) primaryKeys.get(i)); ! updateSQL.append(primaryKey.name).append("= ?"); if ( i < numKeys - 1 ) { --- 1028,1036 ---- { PrimaryKey primaryKey = ((PrimaryKey) primaryKeys.get(i)); ! updateSQL.append("\""); ! updateSQL.append(primaryKey.name); ! updateSQL.append("\" = ?"); if ( i < numKeys - 1 ) { *************** *** 1328,1334 **** 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); for (; rs.next(); i++ ) --- 1332,1347 ---- else { // otherwise go and get the primary keys and create a hashtable of keys ! // 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++ )