From: Dave Cramer <pg@fastcrypt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Date: Thu, 1 Mar 2007 19:09:17 -0500
Message-ID: <A3D1BE07-7266-4DCF-859A-69C67E44B3EF@fastcrypt.com> (raw)
In-Reply-To: <23779.1172793964@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>
On 1-Mar-07, at 7:06 PM, Tom Lane wrote:
> Dave Cramer <pg@fastcrypt.com> writes:
>> The reason that setNull is required is because the type information
>> is required. NULL by it self has no type information. The jdbc driver
>> binds values to a prepared statement and the type information is
>> required. So setNull( n, typeinfo) is required to bind the correct
>> type.
>
> 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 ?
Dave
> regards, tom lane
>
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: pg@fastcrypt.com, tgl@sss.pgh.pa.us
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
In-Reply-To: <A3D1BE07-7266-4DCF-859A-69C67E44B3EF@fastcrypt.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>
* 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