From: Oliver Jowett <oliver@opencloud.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Date: Fri, 02 Mar 2007 14:39:50 +1300
Message-ID: <45E78066.6000604@opencloud.com> (raw)
In-Reply-To: <26671.1172794578@sss.pgh.pa.us>
References: <40939ed60703010604j149caad2n92dccac2ae6f6824@mail.gmail.com>
<3AC75FD4-F9DC-4B9E-AA60-38F67EFD39B0@redhat.com>
<0DC8A2E6-BB3C-4592-BF9E-7EECA0CCE37B@fastcrypt.com>
<23779.1172793964@sss.pgh.pa.us>
<A3D1BE07-7266-4DCF-859A-69C67E44B3EF@fastcrypt.com>
<26671.1172794578@sss.pgh.pa.us>
Tom Lane wrote:
> Dave Cramer <pg@fastcrypt.com> writes:
>> On 1-Mar-07, at 7:06 PM, Tom Lane wrote:
>>> At least in this particular case, leaving the parameter type as
>>> UNKNOWN
>>> would have worked as the OP wishes. I dunno if that would break other
>>> cases though.
>
>> This means you have to leave all parameter types as UNKNOWN. What's
>> the point of having parameter types at all ?
>
> No, only the ones you do not have any knowledge about. The OP's
> complaint is basically that the driver is forcing the parameter type
> to "varchar" on the basis of nothing whatsoever.
I didn't see the OP say what JDBC calls are being made so I think you're
jumping the gun here. If the EJB3 layer is calling something like
setString(n, null) then the driver is quite justified in assuming the
parameter is varchar. I don't think the driver ever goes from "I don't
know the type" to "the type is varchar" .. if anything, it has to do the
opposite to deal with applications that think that setString() on a
numeric column is a sensible thing to do :(
-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, tgl@sss.pgh.pa.us, pg@fastcrypt.com
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
In-Reply-To: <45E78066.6000604@opencloud.com>
References: <40939ed60703010604j149caad2n92dccac2ae6f6824@mail.gmail.com> <3AC75FD4-F9DC-4B9E-AA60-38F67EFD39B0@redhat.com> <0DC8A2E6-BB3C-4592-BF9E-7EECA0CCE37B@fastcrypt.com> <23779.1172793964@sss.pgh.pa.us> <A3D1BE07-7266-4DCF-859A-69C67E44B3EF@fastcrypt.com> <26671.1172794578@sss.pgh.pa.us> <45E78066.6000604@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