Re: ResultSet.getObject return type for smallint

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: ResultSet.getObject return type for smallint
Date: 2005-06-08 01:48:37
Message-ID: 42A64E75.2060402@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kevin Grittner wrote:
>
> According to Appendix B of the JDBC spec, ResultSet.getObject should use
> the mapping shown in table B-3 to determine the object class returned.
> Table B-3 shows SMALLINT mapping to Integer. In
> postgresql-jdbc-8.0-311 a Short is returned instead, which is causing
> problems for our software. It looks like a one-line change will fix
> this -- in the
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.internalGetObject method.

Thanks for the report. I've applied a fix for this, plus support for
various other types in the mapping table that getObject() didn't handle
at all (BOOLEAN, TINYINT, DECIMAL, LONGVARCHAR, LONGVARBINARY, CLOB,
BLOB) to CVS HEAD and the stable 8.0 branch.

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2005-06-08 02:59:21 Re: DatabaseMetaData and Transactions
Previous Message Kevin Grittner 2005-06-07 22:57:43 ResultSet.getObject return type for smallint