Re: [INTERFACES] jdbc, pgsql6.5.1, large objects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John David Garza <garza(at)cjas(dot)org>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] jdbc, pgsql6.5.1, large objects
Date: 1999-07-30 13:57:43
Message-ID: 11032.933343063@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

John David Garza <garza(at)cjas(dot)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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Thomas Lockhart 1999-07-30 14:06:29 Re: [INTERFACES] jdbc, pgsql6.5.1, large objects
Previous Message John David Garza 1999-07-30 01:30:34 jdbc, pgsql6.5.1, large objects