BUG #4674: Unable to open lob - Mailing list pgsql-bugs

From Yuichi Tanaka
Subject BUG #4674: Unable to open lob
Date
Msg-id 200902240727.n1O7ROn5097468@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4674: Unable to open lob  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4674
Logged by:          Yuichi Tanaka
Email address:      yuichi_tanaka@cybozu.co.jp
PostgreSQL version: 8.3.6
Operating system:   Linux
Description:        Unable to open lob
Details:

I wrote the code like below:

    // open lob
    if( (pgsql_lofd1 = lo_open(pgsql, oid, pgsql_mode)) == -1 ) {
        printf("error: first lo_open\n");
    }

    // send query asynchronously
    PQsendQuery(pgsql, "INSERT INTO bar (name) VALUES ('aaa');" );

    // open lob
    if( (pgsql_lofd2 = lo_open(pgsql, oid+1, pgsql_mode)) == -1 ) {
        printf("error: second lo_open\n");
    }


This program displays "error: second lo_open".
Is this a bug or correct behavior?

pgsql-bugs by date:

Previous
From: tomas@tuxteam.de
Date:
Subject: Re: Link to MS Access
Next
From: ""
Date:
Subject: BUG #4675: FATAL: could not reattach to shared memory