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

Hi Tom
 
> It would work but it seems rather pointless; the only reason you would use
those functions is if you have something else > useful to do while waiting
for the query result ... and this program structure isn't very conducive to
doing other stuff > while waiting.  Usually you'd want to have a main loop
that can dispatch handling of various events, one of them being >  >
checking for an available query result.

This is only a sample to demonstrante that I want. But I have plans to do
something, in fact, it will be a win32 application , that shows a non modal
Dialog with a Cancel button and a progessbar. If user wanna cancel the
query, just press cancel button. So, I don't want allows the user to do
anything else, they can't navigate trough a program, because this will
generate another query to be submited to pg, and I don't have plans to
create another one connection for this user. So, they will wait for query to
be finish or then press cancel, that is it.

But, my question, I always should call pqconsume before a pqisbusy ? Can I
use it in a loop ? It will cause some kind of traffic ?

Best Regards
Rodrigo Moreno






view thread (2+ messages)  latest in thread

Message-ID: <20050313191016.40D363C01E@buvuma.terra.com.br>
Permalink:  ../20050313191016.40D363C01E@buvuma.terra.com.br/
Also on:    postgresql.org/message-id/20050313191016.40D363C01E@buvuma.terra.com.br

 · 

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: rodrigo.miguel@terra.com.br, tgl@sss.pgh.pa.us
  Subject: Re: RES: How to use PQconsumeInput and PQisBusy correctly ?
  In-Reply-To: <20050313191016.40D363C01E@buvuma.terra.com.br>

* 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