X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1F93852937 for ; Tue, 7 Jun 2005 22:48:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31569-02 for ; Wed, 8 Jun 2005 01:48:35 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 4DC4F5283B for ; Tue, 7 Jun 2005 22:48:33 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DfpgL-0006Kh-Hn; Wed, 08 Jun 2005 13:48:37 +1200 Message-ID: <42A64E75.2060402@opencloud.com> Date: Wed, 08 Jun 2005 13:48:37 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Grittner Cc: pgsql-jdbc@postgresql.org Subject: Re: ResultSet.getObject return type for smallint References: In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/33 X-Sequence-Number: 12995 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