Skip site navigation (1) Skip section navigation (2)

RE: JDBC 7.0 - ResultSet.getObject() bug

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Gunnar R|nning'" <gunnar(at)candleweb(dot)no>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: JDBC 7.0 - ResultSet.getObject() bug
Date: 2000-05-23 14:18:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Hmmm, it should test using isNull() before trying to parse the object
type. I'll check.


Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.

-----Original Message-----
From: Gunnar R|nning [mailto:gunnar(at)candleweb(dot)no]
Sent: Tuesday, May 23, 2000 2:48 PM
To: pgsql-interfaces(at)postgresql(dot)org
Subject: [INTERFACES] JDBC 7.0 - ResultSet.getObject() bug


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

The JDBC spec states that ResultSet.getObject() should return "null" if
there is an SQL NULL value in the column. The JDBC driver for postgres
however in this case return an object, eg. in the case of an int value
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. 


pgsql-interfaces by date

Next:From: Gunnar R|nningDate: 2000-05-24 11:26:00
Subject: JDBC escape processing
Previous:From: Gunnar R|nningDate: 2000-05-23 13:53:49
Subject: JDBC 7.0 - PreparedStatement.setObject() bug.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group