NULL Blob column error - Mailing list pgsql-jdbc

From David Wall
Subject NULL Blob column error
Date
Msg-id 000901c25865$f8898b20$3201a8c0@expertrade.com
Whole thread Raw
List pgsql-jdbc
My code has a table with an OID that's allowed to be NULL.  When I went to
retrieve the blob using a ResultSet.getBlob() call, I got an exception.  It
appears that a NULL OID value is not being handled correctly since it should
set the state within ResultSet so that I can call ResultSet.wasNull() to see
if the object was retrieved or not.

I received the following exception on 7.2.2:

FastPath call returned ERROR:  inv_open: large object 0 not found

        at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:131)
        at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:181)
        at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:193)
        at
org.postgresql.largeobject.LargeObject.<init>(LargeObject.java:89)
        at
org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:1
33)
        at org.postgresql.largeobject.PGblob.<init>(PGblob.java:37)
        at org.postgresql.jdbc2.ResultSet.getBlob(ResultSet.java:934)

Thanks,
David


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: compile of jdbc driver failed - jdk 1.4.0_01
Next
From: "David Wall"
Date:
Subject: BlobOutputStream patch and related patches