From: Kris Jurka <books@ejurka.com>
To: Chris Gamache <cgamache@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: stringtype=unspecified problem
Date: Thu, 15 Feb 2007 11:40:01 -0500 (EST)
Message-ID: <Pine.BSO.4.64.0702151136230.22285@leary.csoft.net> (raw)
In-Reply-To: <9cc55f600702150612p72490c3by95f5998541cf9932@mail.gmail.com>
References: <9cc55f600702091415r22648579uf5bc0d00e4c9932b@mail.gmail.com>
<45CED295.8050808@opencloud.com>
<9cc55f600702141129l152d6e68i8c32fa0bb11bc788@mail.gmail.com>
<Pine.BSO.4.64.0702141439480.24142@leary.csoft.net>
<9cc55f600702150612p72490c3by95f5998541cf9932@mail.gmail.com>
On Thu, 15 Feb 2007, Chris Gamache wrote:
> On 2/14/07, Kris Jurka <books@ejurka.com> wrote:
>> Here you're explicitly saying that it is a VARCHAR, not that you have a
>> String that you're not sure what the real type is. It would be possible
>> to adjust setNull to check the stringtype setting and use Oid.UNSPECIFIED
>> here, but I'm not sure that would be correct.
>
> We've been batting this around in the office as well. I wish I knew
> what the absolute correct behavior would be in this situation.
>
> An observation that might be insightful is if I can figure out how
>
> setString(1,null);
>
> differs from
>
> setNull(1,java.sql.Types.VARCHAR);
>
What would you expect to happen for these two:
setObject(1, "hi", Types.VARCHAR);
setObject(1, null, Types.VARCHAR);
compared with:
setObject(1, "hi");
setObject(1, null);
By specifying the type you're saying that it really is a VARCHAR, not
indicating that it's an unknown type in a String representation.
Kris Jurka
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: books@ejurka.com, cgamache@gmail.com
Subject: Re: stringtype=unspecified problem
In-Reply-To: <Pine.BSO.4.64.0702151136230.22285@leary.csoft.net>
References: <9cc55f600702091415r22648579uf5bc0d00e4c9932b@mail.gmail.com> <45CED295.8050808@opencloud.com> <9cc55f600702141129l152d6e68i8c32fa0bb11bc788@mail.gmail.com> <Pine.BSO.4.64.0702141439480.24142@leary.csoft.net> <9cc55f600702150612p72490c3by95f5998541cf9932@mail.gmail.com> <Pine.BSO.4.64.0702151136230.22285@leary.csoft.net>
* 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