From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Igor Urisman <igor(dot)urisman(at)gmail(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Improper type conversion from smallint to short |
Date: | 2013-03-15 12:56:03 |
Message-ID: | 1363352163.48241.YahooMailNeo@web162903.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Igor Urisman <igor(dot)urisman(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2013-03-15 17:14:37 | Re: [pgjdbc] XADataSource support for resource sharing & interleaving. (#47) |
Previous Message | Kevin Wooten | 2013-03-15 07:49:32 | Re: A new JDBC driver... |