From: Luca Ferrari <fluca1978@infinito.it>
To: pgsql-jdbc@postgresql.org
Subject: Re: ResultSet internal data type handling
Date: Tue, 12 May 2009 12:03:25 +0200
Message-ID: <200905121203.25544.fluca1978@infinito.it> (raw)
In-Reply-To: <4A092D2E.3070905@kickstone.com>
References: <200905120939.07478.fluca1978@infinito.it>
<4A092D2E.3070905@kickstone.com>
On Tuesday 12 May 2009 10:02:54 am John Lister's cat walking on the keyboard
wrote:
> I believe the original wire protocol only supported text values hence
> the driver converts all data into a string before sending it to the
> server... Because of this the server will generally convert any value
> into the appropriate type (if this conversion is possible) which saves
> the driver from doing so. This simplifies the driver at the expense of
> extra network traffic and errors thrown by the server as opposed to the
> driver. The original authors can probably expand on this
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.
Luca
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: fluca1978@infinito.it
Subject: Re: ResultSet internal data type handling
In-Reply-To: <200905121203.25544.fluca1978@infinito.it>
References: <200905120939.07478.fluca1978@infinito.it> <4A092D2E.3070905@kickstone.com> <200905121203.25544.fluca1978@infinito.it>
* 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