Re: lo_import invalid large object descriptor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Mehrwald <mehrwald(at)ira(dot)uka(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: lo_import invalid large object descriptor
Date: 2008-07-14 16:47:20
Message-ID: 27436.1216054040@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Markus Mehrwald <mehrwald(at)ira(dot)uka(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2008-07-14 16:53:23 Re: NEAR operator
Previous Message Fco. Mario Barcala Rodríguez 2008-07-14 16:34:47 NEAR operator