From 31a925c4d07675bc098a742ee9ca642ec79a40ee Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Sun, 15 Mar 1998 07:12:07 +0000 Subject: From: Peter T Mount Ok, this fixes three things: 1. It seems (from tests submitted by two people with JBuilder) that JBuilder expects a responce from ResultSetMetaData.getPrecision() & getScale() when used on non numeric types. This patch makes these methods return 0, instead of throwing an exception. 2. Fixes a small bug where getting the postgresql type name returns null. 3. Fixes a problem with ResultSet.getObject() where getting it's string value returns null if you case the object as (PGobject), but returns the value if you case it as it's self. --- src/interfaces/jdbc/postgresql/Field.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/interfaces/jdbc/postgresql/Field.java') diff --git a/src/interfaces/jdbc/postgresql/Field.java b/src/interfaces/jdbc/postgresql/Field.java index 78553dd32eb..dd8918e99b7 100644 --- a/src/interfaces/jdbc/postgresql/Field.java +++ b/src/interfaces/jdbc/postgresql/Field.java @@ -58,7 +58,8 @@ public class Field if (result.getColumnCount() != 1 || result.getTupleCount() != 1) throw new SQLException("Unexpected return from query for type"); result.next(); - sql_type = getSQLType(result.getString(1)); + type_name = result.getString(1); + sql_type = getSQLType(type_name); result.close(); } return sql_type; -- cgit v1.2.3