Re: RES: How to use PQconsumeInput and PQisBusy correctly ? - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: RES: How to use PQconsumeInput and PQisBusy correctly ?
Date
Msg-id 18424.1110741675@sss.pgh.pa.us
Whole thread Raw
In response to RES: How to use PQconsumeInput and PQisBusy correctly ?  ("Rodrigo Moreno" <rodrigo.miguel@terra.com.br>)
Responses RES: RES: How to use PQconsumeInput and PQisBusy correctly ?
List pgsql-interfaces
"Rodrigo Moreno" <rodrigo.miguel@terra.com.br> writes:
> But, my question, I always should call pqconsume before a pqisbusy ?

Up to you.  You can always call either one safely, AFAIR.  The isbusy
result tells you whether you can call pqgetresult without blocking.
isbusy itself doesn't change any state --- to make something happen
(ie, collect data from the socket) you need to call consumeinput.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: "Rodrigo Moreno"
Date:
Subject: RES: How to use PQconsumeInput and PQisBusy correctly ?
Next
From: "Rodrigo Moreno"
Date:
Subject: RES: RES: How to use PQconsumeInput and PQisBusy correctly ?