Re: pst.setNull(2, Types.BLOB) - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: pst.setNull(2, Types.BLOB)
Date
Msg-id Pine.BSO.4.56.0502162219090.25741@leary.csoft.net
Whole thread Raw
In response to pst.setNull(2, Types.BLOB)  (Tore Halset <halset@pvv.ntnu.no>)
List pgsql-jdbc

On Wed, 16 Feb 2005, Tore Halset wrote:

> I have just tried to upgrade my jdbc driver, but have a problem with
> setNull for blobs. I am using postgresql-8.0-310.jdbc3.jar with
> commons-dbcp-1.2.1.jar and postgresql-8.0.1.
>
> The test table:
> create table blobtest (a int primary key, b bytea);
>
>              st.setNull(2, Types.BLOB);

This case did not work, and I've committed changes to cvs to make it work,
but not for the bytea case.  BLOB implies using large objects, so it will
set type the null value as oid, not bytea.  You should use one of the
binary types for bytea.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: jdbc security
Next
From: Oliver Jowett
Date:
Subject: Re: JDBC driver