Re: [JDBC] BUG #1780: JDBC driver "setNull" throws for BLOB and CLOB

From: Kris Jurka <books(at)ejurka(dot)com>
To: Andrus Adamchik <andrus(at)objectstyle(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] BUG #1780: JDBC driver "setNull" throws for BLOB and CLOB
Date: 2005-08-01 15:12:15
Message-ID: Pine.BSO.4.56.0508011009570.17912@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-bugs 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message YL 2005-08-01 18:07:43 Re: problem odbc 8.0 with EOModeler
Previous Message Kevin Grittner 2005-08-01 14:25:23 Re: problem odbc 8.0 with EOModeler

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-08-01 15:18:11 Re: Timestamp changes committed to HEAD
Previous Message Andrus Adamchik 2005-08-01 11:40:30 Re: BUG #1780: JDBC driver "setNull" throws for BLOB and CLOB