Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group