From: Kevin Grittner <kgrittn@ymail.com>
To: Igor Urisman <igor.urisman@gmail.com>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Improper type conversion from smallint to short
Date: Fri, 15 Mar 2013 05:56:03 -0700 (PDT)
Message-ID: <1363352163.48241.YahooMailNeo@web162903.mail.bf1.yahoo.com> (raw)
In-Reply-To: <CAJ9OwnUyCP022aagiCyO1kXGfWZwtqKPv-9YHWmr+T7MtqnhRA@mail.gmail.com>
References: <CAJ9OwnUyCP022aagiCyO1kXGfWZwtqKPv-9YHWmr+T7MtqnhRA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Igor Urisman <igor.urisman@gmail.com> wrote:
> It appears that ResultSet.getObject(String name) returns Integer
> for database type Types.SMALLINT (5) I expected Short.
I count on drivers complying with the published specification. 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. In
particular, table B-3 specifies which Java object class should be
returned by the getObject methods for each JDBC type. 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
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
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: kgrittn@ymail.com, igor.urisman@gmail.com
Subject: Re: Improper type conversion from smallint to short
In-Reply-To: <1363352163.48241.YahooMailNeo@web162903.mail.bf1.yahoo.com>
References: <CAJ9OwnUyCP022aagiCyO1kXGfWZwtqKPv-9YHWmr+T7MtqnhRA@mail.gmail.com> <1363352163.48241.YahooMailNeo@web162903.mail.bf1.yahoo.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