JDBC 7.0 - ResultSet.getObject() bug

From: Gunnar R|nning <gunnar(at)candleweb(dot)no>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: JDBC 7.0 - ResultSet.getObject() bug
Date: 2000-05-23 13:48:16
Message-ID: x666s5s7hb.fsf@thor.candleweb.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Gunnar R|nning 2000-05-23 13:53:49 JDBC 7.0 - PreparedStatement.setObject() bug.
Previous Message Anders Bengtsson 2000-05-23 11:49:54 Re: Charsets in JDBC driver?