Re: IN FIRE - Mailing list pgsql-hackers

From Mario Weilguni
Subject Re: IN FIRE
Date
Msg-id 002801c258d5$e0927c50$6f01c00a@icomedias.com
Whole thread Raw
In response to IN FIRE  (Stanislav Silnitski <stalker@minicorp.ru>)
List pgsql-hackers
> 
> 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)!!!!

Use transactions (BEGIN; END;). Large objects rely on this




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PREPARE code notes
Next
From: Tom Lane
Date:
Subject: Re: Rule updates and PQcmdstatus() issue