Re: [INTERFACES] jdbc, pgsql6.5.1, large objects - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: [INTERFACES] jdbc, pgsql6.5.1, large objects
Date
Msg-id 11032.933343063@sss.pgh.pa.us
Whole thread Raw
In response to jdbc, pgsql6.5.1, large objects  (John David Garza <garza@cjas.org>)
List pgsql-interfaces
John David Garza <garza@cjas.org> writes:
> FastPath call returned ERROR:  lo_write: invalid large obj descriptor (0)

This is achieving FAQ status very rapidly.  6.5 enforces the rule that
large object descriptors can only be used within a single transaction.
(This rule has always been in the documentation, but prior releases
didn't check, and most of the time referring to an LO opened in an
old transaction would still work...)

So you need an explicit begin/end transaction around your lo_open ...
lo_close sequence.  In JDBC I think you gotta turn off autocommit,
but I'm not familiar enough with JDBC to quote exact commands for you.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: John David Garza
Date:
Subject: jdbc, pgsql6.5.1, large objects
Next
From: Thomas Lockhart
Date:
Subject: Re: [INTERFACES] jdbc, pgsql6.5.1, large objects