Re: lo_import invalid large object descriptor - Mailing list pgsql-general

From Tom Lane
Subject Re: lo_import invalid large object descriptor
Date
Msg-id 27436.1216054040@sss.pgh.pa.us
Whole thread Raw
In response to lo_import invalid large object descriptor  (Markus Mehrwald <mehrwald@ira.uka.de>)
List pgsql-general
Markus Mehrwald <mehrwald@ira.uka.de> writes:
> I tried to insert an image in my database with lo_import. The error I
> get is "invalid large object descriptor: 0".

lo_import has to be called within a transaction block (BEGIN/COMMIT).
The documentation is not very clear about that :-(

(Actually, rather than fix the documentation we probably ought to fix
the code --- there's enough infrastructure in libpq now that it could
tell whether it needs to start its own transaction or not.)

            regards, tom lane

pgsql-general by date:

Previous
From: "Fco. Mario Barcala" Rodríguez
Date:
Subject: NEAR operator
Next
From: Viktor Rosenfeld
Date:
Subject: UPDATE runs slow in a transaction