From: Oliver Jowett <oliver@opencloud.com>
To: Luca Ferrari <fluca1978@infinito.it>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ResultSet internal data type handling
Date: Tue, 12 May 2009 20:44:33 +1200
Message-ID: <4A0936F1.3010005@opencloud.com> (raw)
In-Reply-To: <200905120939.07478.fluca1978@infinito.it>
References: <200905120939.07478.fluca1978@infinito.it>
Luca Ferrari wrote:
> Having a look at jdbc2.AsbtractJDBC2ResultSet (the parent of all ResultSets) I
> discovered that all data received from the server is handled internally as a
> string (right?) and is converted from the getXXX methods into the appropriate
> type. This means that you can actually write a getString on a date field
> obtaining a valida date (and if you are lucky you can do something the
> opposite). I'm curious to know if this is an implementation choice or a jdbc
> specification and why the objects are not checked against the table metadata
> (as the getInternalObject method does).
There's a table in the JDBC spec that lists the basic type conversions
that a JDBC driver must support. Most types can be converted to strings,
from memory.
-O
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: oliver@opencloud.com, fluca1978@infinito.it
Subject: Re: ResultSet internal data type handling
In-Reply-To: <4A0936F1.3010005@opencloud.com>
References: <200905120939.07478.fluca1978@infinito.it> <4A0936F1.3010005@opencloud.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