1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00
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.
This commit is contained in:
Marc G. Fournier
1998-03-15 07:12:07 +00:00
parent 7eddadee87
commit 31a925c4d0
3 changed files with 5 additions and 4 deletions

View File

@ -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;