Re: BUG #2823: API largeobject calls

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gregor" <gtm2(at)interia(dot)pl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2823: API largeobject calls
Date: 2006-12-12 00:58:22
Message-ID: 21351.1165885102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Gregor" <gtm2(at)interia(dot)pl> writes:
> API funtions lo_open, lo_write, lo_import don't work.

You need to do lo_open/lo_write/etc inside a transaction block, because
the LO handle returned by lo_open is only good until end of transaction.
(And yes, zero is a valid handle.) See the example program in the docs:
http://www.postgresql.org/docs/8.2/static/lo-examplesect.html
and note the begin/commit commands it issues.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message J. Greg Davidson 2006-12-12 05:33:34 SPI_getvalue calls output function w/o pushing existing SPI connection + 2 extra issues
Previous Message Milen A. Radev 2006-12-12 00:23:34 Re: GRANT RULE IN 8.2