Re: Possible Bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Possible Bug
Date
Msg-id 15416.1014150792@sss.pgh.pa.us
Whole thread Raw
In response to Possible Bug  ("Chuck Handshy" <chuck.handshy@gcinet.net>)
List pgsql-bugs
"Chuck Handshy" <chuck.handshy@gcinet.net> writes:
> When you pass a oid to the lo_open it doesn't seem to be able to accept
> it and cause and error to be generated in the log file: ERROR:
> lo_lseek: invalid large obj descriptor (0) <- Note descriptor (0), I
> passed 16832 to it as the oid.

Descriptor 0 is fine.

I suspect you have forgotten to establish a transaction block
(begin/end) around the LO operations.  The descriptor returned by
lo_open is only good for the duration of the transaction block.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Eugene Pervago
Date:
Subject: crash on cash_words('21,474,836.48'::money)
Next
From: Tom Lane
Date:
Subject: Re: Postgresql 7.1.3 not thread safe