X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 97A28565E5 for ; Sun, 13 Mar 2005 19:10:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07269-02 for ; Sun, 13 Mar 2005 19:10:17 +0000 (GMT) Received: from loncoche.terra.com.br (loncoche.terra.com.br [200.154.55.229]) by svr1.postgresql.org (Postfix) with ESMTP id 1EA8F565DA for ; Sun, 13 Mar 2005 19:10:16 +0000 (GMT) Received: from buvuma.terra.com.br (buvuma.terra.com.br [200.154.55.139]) by loncoche.terra.com.br (Postfix) with ESMTP id 8B083E78373; Sun, 13 Mar 2005 16:10:16 -0300 (BRT) X-Terra-Karma: -2% X-Terra-Hash: 88ea17d984f5ccfda9747aeaa1062fc3 Received-SPF: pass (buvuma.terra.com.br: domain of terra.com.br designates 200.154.55.139 as permitted sender) client-ip=200.154.55.139; envelope-from=rodrigo.miguel@terra.com.br; helo=rmsmnote; Received: from rmsmnote (unknown [200.168.176.149]) (authenticated user rodrmigu) by buvuma.terra.com.br (Postfix) with ESMTP id 40D363C01E; Sun, 13 Mar 2005 16:10:16 -0300 (BRT) From: "Rodrigo Moreno" To: "'Tom Lane'" Cc: Subject: RES: How to use PQconsumeInput and PQisBusy correctly ? Date: Sun, 13 Mar 2005 16:10:02 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-reply-to: <18233.1110740054@sss.pgh.pa.us> Thread-Index: AcUn/g6YTsFqkZBpRkeSgeyDCKb0cAAAS4Ig X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-Id: <20050313191016.40D363C01E@buvuma.terra.com.br> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.011 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST X-Spam-Level: * X-Archive-Number: 200503/37 X-Sequence-Number: 5366 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