From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Luca Ferrari <fluca1978(at)infinito(dot)it> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: ResultSet internal data type handling |
Date: | 2009-05-12 10:09:12 |
Message-ID: | 4A094AC8.4050100@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Luca Ferrari wrote:
> It is not clear to me: the driver is receiving always strings from the server,
> and therefore must do the conversion by itself. The fact is that such
> conversion is not checked against the table definition. I would expect an
> SQLException if I try to read an integer as a string or viceversa. Instead the
> conversion can work and the driver says nothing about.
The JDBC spec says the driver does conversions depending on the
ResultSet getter method you use. See table B-6 in appendix B of the JDBC
spec. In this particular case, the table says you can getInt() on a
VARCHAR and getString() on an INTEGER.
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2009-05-12 10:16:34 | Re: Unable to access table named "user" |
Previous Message | John Lister | 2009-05-12 10:08:57 | Re: ResultSet internal data type handling |