Re: RES: How to use PQconsumeInput and PQisBusy correctly ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rodrigo Moreno" <rodrigo(dot)miguel(at)terra(dot)com(dot)br>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: RES: How to use PQconsumeInput and PQisBusy correctly ?
Date: 2005-03-13 19:21:15
Message-ID: 18424.1110741675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

"Rodrigo Moreno" <rodrigo(dot)miguel(at)terra(dot)com(dot)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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Rodrigo Moreno 2005-03-13 19:33:39 RES: RES: How to use PQconsumeInput and PQisBusy correctly ?
Previous Message Rodrigo Moreno 2005-03-13 19:10:02 RES: How to use PQconsumeInput and PQisBusy correctly ?