pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ResultSet.getObject return type for smallint
Date: Wed, 08 Jun 2005 13:48:37 +1200
Message-ID: <42A64E75.2060402@opencloud.com> (raw)
In-Reply-To: <s2a5e01f.063@gwmta.wicourts.gov>
References: <s2a5e01f.063@gwmta.wicourts.gov>

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



view thread (2+ messages)

Message-ID: <42A64E75.2060402@opencloud.com>
Permalink:  ../42A64E75.2060402@opencloud.com/
Also on:    postgresql.org/message-id/42A64E75.2060402@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, Kevin.Grittner@wicourts.gov
  Subject: Re: ResultSet.getObject return type for smallint
  In-Reply-To: <42A64E75.2060402@opencloud.com>
  References: <s2a5e01f.063@gwmta.wicourts.gov> <42A64E75.2060402@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox