Re: ResultSet internal data type handling - Mailing list pgsql-jdbc

From Luca Ferrari
Subject Re: ResultSet internal data type handling
Date
Msg-id 200905121203.25544.fluca1978@infinito.it
Whole thread Raw
In response to Re: ResultSet internal data type handling  (John Lister <john.lister@kickstone.com>)
Responses Re: ResultSet internal data type handling  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Joe Kramer
Date:
Subject: Re: [GENERAL] Unable to access table named "user"
Next
From: Oliver Jowett
Date:
Subject: Re: ResultSet internal data type handling