pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Cramer <pg@fastcrypt.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Date: Thu, 01 Mar 2007 19:06:04 -0500
Message-ID: <23779.1172793964@sss.pgh.pa.us> (raw)
In-Reply-To: <0DC8A2E6-BB3C-4592-BF9E-7EECA0CCE37B@fastcrypt.com>
References: <40939ed60703010604j149caad2n92dccac2ae6f6824@mail.gmail.com>
	<3AC75FD4-F9DC-4B9E-AA60-38F67EFD39B0@redhat.com>
	<0DC8A2E6-BB3C-4592-BF9E-7EECA0CCE37B@fastcrypt.com>

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.

			regards, tom lane



view thread (14+ messages)  latest in thread

Message-ID: <23779.1172793964@sss.pgh.pa.us>
Permalink:  ../23779.1172793964@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23779.1172793964@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, pg@fastcrypt.com
  Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
  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>

* 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