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?