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.9 diff -c -r1.9 AbstractJdbc2ResultSet.java *** src/interfaces/jdbc/org/postgresql/jdbc2//AbstractJdbc2ResultSet.java 2002/10/17 19:17:08 1.9 --- src/interfaces/jdbc/org/postgresql/jdbc2//AbstractJdbc2ResultSet.java 2002/11/04 04:36:16 *************** *** 1406,1439 **** String columnName = (String) columns.nextElement(); int columnIndex = _findColumn( columnName ) - 1; ! switch ( connection.getSQLType( fields[columnIndex].getPGType() ) ) { ! case Types.DECIMAL: ! case Types.BIGINT: ! case Types.DOUBLE: ! case Types.BIT: ! case Types.VARCHAR: ! case Types.DATE: ! case Types.TIME: ! case Types.TIMESTAMP: ! case Types.SMALLINT: ! case Types.FLOAT: ! case Types.INTEGER: ! case Types.CHAR: ! case Types.NUMERIC: ! case Types.REAL: ! case Types.TINYINT: ! rowBuffer[columnIndex] = connection.getEncoding().encode(String.valueOf( updateValues.get( columnName ) )); ! case Types.NULL: ! continue; ! default: ! rowBuffer[columnIndex] = (byte[]) updateValues.get( columnName ); ! } } } --- 1406,1447 ---- String columnName = (String) columns.nextElement(); int columnIndex = _findColumn( columnName ) - 1; ! Object valueObject = updateValues.get(columnName); ! if (valueObject instanceof NullObject) { ! rowBuffer[columnIndex] = null; ! } ! else { + + switch ( connection.getSQLType( fields[columnIndex].getPGType() ) ) + { ! case Types.DECIMAL: ! case Types.BIGINT: ! case Types.DOUBLE: ! case Types.BIT: ! case Types.VARCHAR: ! case Types.DATE: ! case Types.TIME: ! case Types.TIMESTAMP: ! case Types.SMALLINT: ! case Types.FLOAT: ! case Types.INTEGER: ! case Types.CHAR: ! case Types.NUMERIC: ! case Types.REAL: ! case Types.TINYINT: ! rowBuffer[columnIndex] = connection.getEncoding().encode(String.valueOf( valueObject)); ! case Types.NULL: ! continue; ! default: ! rowBuffer[columnIndex] = (byte[]) valueObject; ! } + } } }