JDBC 7.0 - ResultSet.getObject() bug - Mailing list pgsql-interfaces

From Gunnar R|nning
Subject JDBC 7.0 - ResultSet.getObject() bug
Date
Msg-id x666s5s7hb.fsf@thor.candleweb.no
Whole thread Raw
List pgsql-interfaces
Hello, 

I just discovered what I think must be regarded as bug in the JDBC driver
shipped with the 7.0 release. 

The JDBC spec states that ResultSet.getObject() should return "null" if the
there is an SQL NULL value in the column. The JDBC driver for postgres does
however in this case return an object, eg. in the case of an int value it
returns an Integer object with the value of "0". 

From looking at source code it is apparent that the problem is that the
getObject() method reuses the public getInt() methods with friends. 

Regards, Gunnar


pgsql-interfaces by date:

Previous
From: Anders Bengtsson
Date:
Subject: Re: Charsets in JDBC driver?
Next
From: Gunnar R|nning
Date:
Subject: JDBC 7.0 - PreparedStatement.setObject() bug.