Re: PQisBusy() always returns TRUE - Mailing list pgsql-general

From Tom Lane
Subject Re: PQisBusy() always returns TRUE
Date
Msg-id 10130.1105811127@sss.pgh.pa.us
Whole thread Raw
In response to PQisBusy() always returns TRUE  (ntinos@aueb.gr)
Responses Re: PQisBusy() always returns TRUE
List pgsql-general
ntinos@aueb.gr 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...
>         if (!PQisBusy(conn))
>         {
>              res=PQgetResult(conn);
>          }
>         else elog(INFO,"It is too busy to give me the results!");
>        }

PQconsumeInput has to be part of the loop.  PQisBusy doesn't change any
state, it just tells you whether PQconsumeInput has collected a complete
query result yet.

            regards, tom lane

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: OID Usage
Next
From: Bo Lorentsen
Date:
Subject: Index optimization ?