Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Date: 2007-03-02 00:06:04
Message-ID: 23779.1172793964@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer <pg(at)fastcrypt(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2007-03-02 00:09:17 Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Previous Message Dave Cramer 2007-03-01 23:35:32 Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?