pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rodrigo Moreno <rodrigo.miguel@terra.com.br>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: RES: How to use PQconsumeInput and PQisBusy correctly ?
Date: Sun, 13 Mar 2005 14:21:15 -0500
Message-ID: <18424.1110741675@sss.pgh.pa.us> (raw)
In-Reply-To: <20050313191016.40D363C01E@buvuma.terra.com.br>
References: <20050313191016.40D363C01E@buvuma.terra.com.br>

"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



view thread (2+ messages)

Message-ID: <18424.1110741675@sss.pgh.pa.us>
Permalink:  ../18424.1110741675@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18424.1110741675@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rodrigo.miguel@terra.com.br
  Subject: Re: RES: How to use PQconsumeInput and PQisBusy correctly ?
  In-Reply-To: <18424.1110741675@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox