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 564025657B for ; Sun, 13 Mar 2005 19:34:01 +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 11180-08 for ; Sun, 13 Mar 2005 19:33:52 +0000 (GMT) Received: from loncoche.terra.com.br (loncoche.terra.com.br [200.154.55.229]) by svr1.postgresql.org (Postfix) with ESMTP id 664BE564A1 for ; Sun, 13 Mar 2005 19:33:51 +0000 (GMT) Received: from pasto.terra.com.br (pasto.terra.com.br [200.154.55.137]) by loncoche.terra.com.br (Postfix) with ESMTP id A686CE785DB; Sun, 13 Mar 2005 16:33:52 -0300 (BRT) X-Terra-Karma: -2% X-Terra-Hash: bf635e373c85db9a21b86653e5e8ebfa Received: from rmsmnote (unknown [200.168.176.149]) (authenticated user rodrmigu) by pasto.terra.com.br (Postfix) with ESMTP id 59C33794012; Sun, 13 Mar 2005 16:33:52 -0300 (BRT) From: "Rodrigo Moreno" To: "'Tom Lane'" Cc: Subject: RES: RES: How to use PQconsumeInput and PQisBusy correctly ? Date: Sun, 13 Mar 2005 16:33:39 -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: <18424.1110741675@sss.pgh.pa.us> Thread-Index: AcUoAdQxfrznwvJuRper2UijvsqG5AAAJjwg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-Id: <20050313193352.59C33794012@pasto.terra.com.br> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.997 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST X-Spam-Level: X-Archive-Number: 200503/39 X-Sequence-Number: 5368 Thanks Tom, One more question, today I'm using the syncronous functions, like PQexec, so, my apps is frozen until the query to be finish. I'm wondering 1) Use pqexec in a separate thread, wait the thread or call PQgetCancel/PQcancel when user request that, or 2) Use PQconsumeInput/PQisBusy, in a non-thread program and wait for query to be finish or user request their cancel. What is the better one ? Thanks Rodrigo Moreno