1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

Attached is a patch to fix the current issues with building under jdbc1.

This patch moves the logic that looks up TypeOid, PGTypeName, and
SQLTypeName from Field to Connection.  It is moved to connection since
it needs to differ from the jdbc1 to jdbc2 versions and Connection
already has different subclasses for the two driver versions.  It also
made sense to move the logic to Connection as some of the logic was
already there anyway.

Barry Lind
This commit is contained in:
Bruce Momjian
2001-08-24 16:50:18 +00:00
parent 968d7733a1
commit 76a6da8a1b
12 changed files with 311 additions and 188 deletions

View File

@ -1963,7 +1963,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
dr.next();
String typname=dr.getString(1);
dr.close();
tuple[4] = Integer.toString(Field.getSQLType(typname)).getBytes(); // Data type
tuple[4] = Integer.toString(connection.getSQLType(typname)).getBytes(); // Data type
tuple[5] = typname.getBytes(); // Type name
// Column size
@ -2596,7 +2596,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
byte[][] tuple = new byte[18][];
String typname=rs.getString(1);
tuple[0] = typname.getBytes();
tuple[1] = Integer.toString(Field.getSQLType(typname)).getBytes();
tuple[1] = Integer.toString(connection.getSQLType(typname)).getBytes();
tuple[2] = b9; // for now
tuple[6] = bnn; // for now
tuple[7] = bf; // false for now - not case sensitive