Hi, all.
Sorry if you have received same mail in pgsql-bugs mailing list.
I wrote C code with libpq using PQsendQuery and lo_open.
In some situation, I cannot open large object.
The situation is following:
1. Open some large object file (using lo_open).
-> succeed
2. Send query asynchronously (using PQsendQuery).
-> succeed
3. Get query result (using PQgetResult).
-> succeed
4. Open another large object file (using pg_lo_open).
-> fail
As a result, second large object lo_open (No.4) returns false.
But if I execute PQgetResult twice, I can open both large objects.
1. Open some large object file (using lo_open).
-> succeed.
2. Send query asynchronously (using PQsendQuery).
-> succeed.
3. Get query result (using PQgetResult).
-> succeed.
4. Get query result (using PQgetResult).
-> Returns NULL.
5. Open another large object file (using pg_lo_open).
-> succeed.
Do I always have to call PQgetResult until this function returns NULL pointer?
----
Yuichi Tanaka (yuichi_tanaka@cybozu.co.jp)