Re: BUG #1780: JDBC driver "setNull" throws for BLOB and CLOB - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: BUG #1780: JDBC driver "setNull" throws for BLOB and CLOB
Date
Msg-id Pine.BSO.4.56.0508011009570.17912@leary.csoft.net
Whole thread Raw
In response to Re: BUG #1780: JDBC driver "setNull" throws for BLOB and CLOB  (Andrus Adamchik <andrus@objectstyle.org>)
List pgsql-jdbc

On Mon, 1 Aug 2005, Andrus Adamchik wrote:

> Just tested it with build 312 and the original problem went away. Now
> I am seeing a new problem with null BLOBs only:
>
> java.sql.SQLException: ERROR: column "blob_col" is of type bytea but
> expression is of type oid

bytea is not the correct type to use when storing Blobs.  You need to use
oid as the underlying type, or if you want to use bytea you need to use
setBytes or setNull(x, Types.BINARY).

Kris Jurka

pgsql-jdbc by date:

Previous
From: Andrus Adamchik
Date:
Subject: Re: BUG #1780: JDBC driver "setNull" throws for BLOB and CLOB
Next
From: Kris Jurka
Date:
Subject: Re: Timestamp changes committed to HEAD