Re: Mismatched JDBC and Java Type

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: Mike Finn <mike(dot)finn(at)tacticalExecutive(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Mismatched JDBC and Java Type
Date: 2001-04-29 10:20:17
Message-ID: 5.0.2.1.0.20010429111824.02704be0@mail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

At 11:45 27/04/01 -0600, Mike Finn wrote:
>I am using a short (Short) in my application for a particular data field
>My understanding is that this should map to the JDBC type 'smallInt' which
>in turn maps to the postgresql type int2.
>
>However when I retrieve data via JDBC (jdbc7.0-1.2.jar, 7.0.3-2 engine)
>the int2 fields are returned as java.lang.Integer instead of java.lang.Short.

Possibly, but it depends on how the JDBC driver is seeing it. It should see
int2 as Short.

Peter

>note that md.getColumnClassName() is not implemented so I don't know what it
>would return.

Hmm, I'l check 7.1, as I thought it was implemented now...

Peter

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-04-29 21:38:57 Re: help mail about JDBC
Previous Message Peter Mount 2001-04-29 10:18:16 Re: JDBC installation