From: Oliver Jowett <oliver@opencloud.com>
To: Silvio Bierman <sbierman@jambo-software.com>
Cc: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: PreparedStatement#setString on non-string parameters
Date: Wed, 09 Mar 2005 10:23:33 +1300
Message-ID: <422E17D5.9080109@opencloud.com> (raw)
In-Reply-To: <JGEOKLDJHLJNAPFIBKBNCEICDCAA.sbierman@jambo-software.com>
References: <JGEOKLDJHLJNAPFIBKBNCEICDCAA.sbierman@jambo-software.com>
Silvio Bierman wrote:
> The JDBC spec requires the driver to attempt a conversion when a
> setString is done on a non-string parameter. This will break a lot of
> conformant code, not only ours. Is there any chance this can be corrected?
AFAIK, the spec doesn't require this. Can you point me at the bit of the
spec that makes you think it does?
As I read the spec, the only conversions the driver performs for IN
parameters are those in table B-2 (for String, to
CHAR/VARCHAR/LONGVARCHAR) or B-4 (same mapping for String). See 13.2.2.1
and 13.2.2.2 of the JDBC 3.0 spec.
There is a wider set of conversions available on the ResultSet path
(notably, integer -> string) -- see 14.2.3.1 and table B-6.
-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, sbierman@jambo-software.com
Subject: Re: PreparedStatement#setString on non-string parameters
In-Reply-To: <422E17D5.9080109@opencloud.com>
References: <JGEOKLDJHLJNAPFIBKBNCEICDCAA.sbierman@jambo-software.com> <422E17D5.9080109@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