? build
? jars
? patch.diff
? org/postgresql/Driver.java
? org/postgresql/jdbc2/ResultSetMetaData.java.diff
Index: org/postgresql/jdbc1/ResultSet.java
===================================================================
RCS file: /projects/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java,v
retrieving revision 1.33
diff -c -r1.33 ResultSet.java
*** org/postgresql/jdbc1/ResultSet.java 2002/06/07 16:46:23 1.33
--- org/postgresql/jdbc1/ResultSet.java 2002/06/08 23:58:45
***************
*** 927,935 ****
switch (field.getSQLType())
{
case Types.BIT:
! return new Boolean(getBoolean(columnIndex));
case Types.SMALLINT:
! return new Short((short)getInt(columnIndex));
case Types.INTEGER:
return new Integer(getInt(columnIndex));
case Types.BIGINT:
--- 927,935 ----
switch (field.getSQLType())
{
case Types.BIT:
! return getBoolean(columnIndex) ? Boolean.TRUE : Boolean.FALSE;
case Types.SMALLINT:
! return new Short(getShort(columnIndex));
case Types.INTEGER:
return new Integer(getInt(columnIndex));
case Types.BIGINT:
Index: org/postgresql/jdbc2/ResultSet.java
===================================================================
RCS file: /projects/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java,v
retrieving revision 1.52
diff -c -r1.52 ResultSet.java
*** org/postgresql/jdbc2/ResultSet.java 2002/06/07 16:46:24 1.52
--- org/postgresql/jdbc2/ResultSet.java 2002/06/08 23:58:47
***************
*** 744,752 ****
switch (field.getSQLType())
{
case Types.BIT:
! return new Boolean(getBoolean(columnIndex));
case Types.SMALLINT:
! return new Short((short)getInt(columnIndex));
case Types.INTEGER:
return new Integer(getInt(columnIndex));
case Types.BIGINT:
--- 744,752 ----
switch (field.getSQLType())
{
case Types.BIT:
! return getBoolean(columnIndex) ? Boolean.TRUE : Boolean.FALSE;
case Types.SMALLINT:
! return new Short(getShort(columnIndex));
case Types.INTEGER:
return new Integer(getInt(columnIndex));
case Types.BIGINT:
Index: org/postgresql/jdbc2/ResultSetMetaData.java
===================================================================
RCS file: /projects/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java,v
retrieving revision 1.11
diff -c -r1.11 ResultSetMetaData.java
*** org/postgresql/jdbc2/ResultSetMetaData.java 2002/02/22 03:22:31 1.11
--- org/postgresql/jdbc2/ResultSetMetaData.java 2002/06/08 23:58:59
***************
*** 471,476 ****
--- 471,491 ----
// ** JDBC 2 Extensions **
// This can hook into our PG_Object mechanism
+ /**
+ * Returns the fully-qualified name of the Java class whose instances
+ * are manufactured if the method ResultSet.getObject
+ * is called to retrieve a value from the column.
+ *
+ * ResultSet.getObject
may return a subclass of the class
+ * returned by this method.
+ *
+ * @param column the first column is 1, the second is 2, ...
+ * @return the fully-qualified name of the class in the Java programming
+ * language that would be used by the method
+ * ResultSet.getObject
to retrieve the value in the specified
+ * column. This is the class name used for custom mapping.
+ * @exception SQLException if a database access error occurs
+ */
public String getColumnClassName(int column) throws SQLException
{
/*
***************
*** 505,538 ****
Types.TIMESTAMP,Types.TIMESTAMP
*/
! int sql_type = getField(column).getSQLType();
! switch (sql_type)
! {
! case Types.BIT:
! return("java.lang.Boolean");
! case Types.SMALLINT:
! return("java.lang.Integer");
! case Types.INTEGER:
! return("java.lang.Integer");
! case Types.BIGINT:
! return("java.lang.Long");
! case Types.NUMERIC:
! return("java.math.BigDecimal");
! case Types.REAL:
! return("java.lang.Float");
! case Types.DOUBLE:
! return("java.lang.Double");
! case Types.CHAR:
! case Types.VARCHAR:
! return("java.lang.String");
! case Types.DATE:
! case Types.TIME:
! case Types.TIMESTAMP:
! return("java.sql.Timestamp");
! default:
! throw org.postgresql.Driver.notImplemented();
! }
! }
}
--- 520,566 ----
Types.TIMESTAMP,Types.TIMESTAMP
*/
! Field field = getField(column);
! int sql_type = field.getSQLType();
! switch (sql_type)
! {
! case Types.BIT:
! return("java.lang.Boolean");
! case Types.SMALLINT:
! return("java.lang.Short");
! case Types.INTEGER:
! return("java.lang.Integer");
! case Types.BIGINT:
! return("java.lang.Long");
! case Types.NUMERIC:
! return("java.math.BigDecimal");
! case Types.REAL:
! return("java.lang.Float");
! case Types.DOUBLE:
! return("java.lang.Double");
! case Types.CHAR:
! case Types.VARCHAR:
! return("java.lang.String");
! case Types.DATE:
! return("java.sql.Date");
! case Types.TIME:
! return("java.sql.Time");
! case Types.TIMESTAMP:
! return("java.sql.Timestamp");
! case Types.BINARY:
! case Types.VARBINARY:
! return("java.sql.Object");
! case Types.ARRAY:
! return("java.sql.Array");
! default:
! String type = field.getPGType();
! if ("unknown".equals(type))
! {
! return("java.lang.String");
! }
! return("java.lang.Object");
! }
! }
}