Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGUB8-0002R4-9s for pgsql-jdbc@arkaria.postgresql.org; Fri, 15 Mar 2013 12:56:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UGUB7-0007HX-1S for pgsql-jdbc@arkaria.postgresql.org; Fri, 15 Mar 2013 12:56:09 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGUB5-0007HR-BY for pgsql-jdbc@postgresql.org; Fri, 15 Mar 2013 12:56:08 +0000 Received: from nm4-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.129]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UGUB3-0007m7-0Y for pgsql-jdbc@postgresql.org; Fri, 15 Mar 2013 12:56:06 +0000 Received: from [98.139.214.32] by nm4.bullet.mail.bf1.yahoo.com with NNFMP; 15 Mar 2013 12:56:04 -0000 Received: from [98.139.212.226] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 15 Mar 2013 12:56:04 -0000 Received: from [127.0.0.1] by omp1035.mail.bf1.yahoo.com with NNFMP; 15 Mar 2013 12:56:04 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 23797.23822.bm@omp1035.mail.bf1.yahoo.com Received: (qmail 48512 invoked by uid 60001); 15 Mar 2013 12:56:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1363352163; bh=PrDRmBOiNE3ZEeC8gJxZfxEMcvPL4cgnlRs9ZKnmK84=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=FJsB5kDeZl4SCfSKyiVx+MZ/14hNK2oQUOtBRUELt3bUcAZZSC54jdjDrPYxyEyXqG6qImhS6tUAvZ1Zg5AYP6GkfEWuJJiAJtIKzMDLdGWtbCZsagtHK3JO0CcIeZOWtvXulTk6jvZkSw4d2Jm7dNsSbbasDlEKY20LXMmEvoo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=MOKj2awTc3IcpqYgABtF/e3JEnaD0xKacmjMAQ2zE9osL52E8RCC/mWts5tmeNSXEOpm1nH6i4Y7n3P24qLIxlG12yOCssyuY09CiEtjzRP8iAHOodIwttWZJ/Hl7ZQuxG8sPpVDrnK+vm0MhLv90sreOeEHrI/g8B+Cue/GwuM=; X-YMail-OSG: N1gKGSgVM1n5SWd5oDLoiRNE80aJOO45yqptIJMpDQ7o4nZ xFZrELZkjctc6zkV2GKXVGAgE8vep05yo0DlICsd7DIp5aRBKca44mXjqJHN Mos8A0wjJcPD15fa2MJA.HcYArM8A2O6khpfmAZITu2w8WkhQeSEQyTUCdTY s.1fldbsrVrFQvxW5XV_z49BnUDKks2QJU9ZKxBnzPJwgnEIu41R4oq9IIV0 mnvoi0llQRXELEyWGopvSMjD1q3mNbYEjEN6hp4Qw8i4sJ.2SsRRhoF2FDrt broleqAWGQkWAPCF4geLFPR8RRa2odh5u4FzkgoGfUMMCBbhlkGgzOaod38L gqoJBO7Y.wL.1imzplM4Oj7oxSr7YTlWVDjUIH40SOLUqoEOjWAB.C1M1YwW gmK7VIWIH6JZfi6qprQ2_C8fKNWk5VzQXvDKuaHAhK.fiV.JV66n1CDbwjd2 JEDdnYO.o3wz92XLuRjG8R8O6ulZfeNCsy.rKzVXy1JHZ6ci5q7Mx5D1c0Dr _jKTHs8f5uIH4MuWZvMW99tlFaPZf2JrhhKco9f.pxQ73w5pCHpFHrtBf9oF HzLwybH_cvaj3TqhCj7RkdtKphrsmqQOX1Ka5P4kLPYsIzQrIBiBVtGv4q5H QKL55q1lf6aVtds0I2kc2WiPuMBVgkjSKlgxEwQpFQ3FHm3SR_A-- Received: from [76.255.18.237] by web162903.mail.bf1.yahoo.com via HTTP; Fri, 15 Mar 2013 05:56:03 PDT X-Rocket-MIMEInfo: 002.001, SWdvciBVcmlzbWFuIDxpZ29yLnVyaXNtYW5AZ21haWwuY29tPiB3cm90ZToKCj4gSXQgYXBwZWFycyB0aGF0IFJlc3VsdFNldC5nZXRPYmplY3QoU3RyaW5nIG5hbWUpIHJldHVybnMgSW50ZWdlcgo.IGZvciBkYXRhYmFzZSB0eXBlIFR5cGVzLlNNQUxMSU5UICg1KcKgIEkgZXhwZWN0ZWQgU2hvcnQuCgpJIGNvdW50IG9uIGRyaXZlcnMgY29tcGx5aW5nIHdpdGggdGhlIHB1Ymxpc2hlZCBzcGVjaWZpY2F0aW9uLsKgIFRoZQptb3N0IHJlY2VudCB2ZXJzaW9uIEkgd2FzIGFibGUgdG8gZmluZCBuZWFyIHRoZSABMAEBAQE- X-Mailer: YahooMailWebService/0.8.137.519 References: Message-ID: <1363352163.48241.YahooMailNeo@web162903.mail.bf1.yahoo.com> Date: Fri, 15 Mar 2013 05:56:03 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Improper type conversion from smallint to short To: Igor Urisman , "pgsql-jdbc@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.5 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Igor Urisman wrote: > It appears that ResultSet.getObject(String name) returns Integer > for database type Types.SMALLINT (5)=A0 I expected Short. I count on drivers complying with the published specification.=A0 The most recent version I was able to find near the top of a quick web search was this (the Final Release of the JDBC 4.0 Specification): http://download.oracle.com/otn-pub/jcp/jdbc-4.0-fr-eval-oth-JSpec/jdbc-4_0-= fr-spec.zip Take a look at the "Data Type Conversion Tables" in appendix B.=A0 In particular, table B-3 specifies which Java object class should be returned by the getObject methods for each JDBC type.=A0 To do as you request would break the applications of everyone who trusts the specification published through the Java Community Process. -- Kevin Grittner EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc