Re: [GENERAL] PQisBusy() always returns TRUE

2005-01-15 Thread ntinos
Martijn van Oosterhout writes: On Sat, Jan 15, 2005 at 09:50:35PM +0200, [EMAIL PROTECTED] wrote: PQconsumeInput(conn);//Try to collect the results while (PQisBusy(conn)) // while not ready ... PQconsumeInput(conn); //...retry res=PQgetResult(conn); // Now get the results

Re: [GENERAL] PQisBusy() always returns TRUE

2005-01-15 Thread Martijn van Oosterhout
On Sat, Jan 15, 2005 at 09:50:35PM +0200, [EMAIL PROTECTED] wrote: > If understand correctly what you are saying, the right code for this thing > is: > > PQconsumeInput(conn);//Try to collect the results > while (PQisBusy(conn)) // while not ready ... > PQconsumeInput(conn);

Re: [GENERAL] PQisBusy() always returns TRUE

2005-01-15 Thread ntinos
If understand correctly what you are saying, the right code for this thing is: PQconsumeInput(conn);//Try to collect the results while (PQisBusy(conn)) // while not ready ... PQconsumeInput(conn); //...retry res=PQgetResult(conn); // Now get the results I tried this and

Re: [GENERAL] PQisBusy() always returns TRUE

2005-01-15 Thread Tom Lane
[EMAIL PROTECTED] writes: >if (PQconsumeInput(conn)!=1) elog(ERROR,"Error in consume..."); > else > { > elog(INFO,"OK with PQconsumeInput"); >//Will use a cursor and 'while' later when this >//will have been fixed... >

[GENERAL] PQisBusy() always returns TRUE

2005-01-15 Thread ntinos
Hi, I'm writing some code for asychronous command processing and I experience the following problem. Everything seems to be OK (by following the documentation) until I call PQisBusy(). While PQconsumeInput() returns 1, PQisBusy() always returns 1! This is the code: --