Re: IN FIRE

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Stanislav Silnitski <stalker(at)minicorp(dot)ru>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: IN FIRE
Date: 2002-09-10 12:56:24
Message-ID: m3admq3sw7.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stanislav Silnitski <stalker(at)minicorp(dot)ru> writes:

> HELP!!!
>
> I'm stuck for strange reason!
> This is my first attempt to use pg_lo concept in my apps:
>
> ...
> Oid oid;
> PGconn* dbcon = PQconnectdb(conninfo.c_str());
> oid = lo_creat(dbcon, INV_WRITE | INV_READ);
> int pgfd = lo_open(dbcon, oid, INV_WRITE | INV_READ);
> ...
>
>
> lo_open ALWAYS returns -1 while oid is positive (I can even see oid
> in pg_largeobject system table)!!!!
>
> postmaster reports the following:
> ERROR: lo_lseek: invalid large obj descriptor (0)

You need to do all your LO manipulation inside a transaction. See the
docs.

-Doug

In response to

  • IN FIRE at 2002-09-09 16:01:12 from Stanislav Silnitski

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-10 13:24:26 Re: Rule updates and PQcmdstatus() issue
Previous Message Oliver Elphick 2002-09-10 11:18:36 Re: