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 57286563E2 for ; Sun, 13 Mar 2005 19:21:23 +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 09320-04 for ; Sun, 13 Mar 2005 19:21:14 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 78F8F563A5 for ; Sun, 13 Mar 2005 19:21:14 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2DJLF4S018425; Sun, 13 Mar 2005 14:21:15 -0500 (EST) To: "Rodrigo Moreno" Cc: pgsql-interfaces@postgresql.org Subject: Re: RES: How to use PQconsumeInput and PQisBusy correctly ? In-reply-to: <20050313191016.40D363C01E@buvuma.terra.com.br> References: <20050313191016.40D363C01E@buvuma.terra.com.br> Comments: In-reply-to "Rodrigo Moreno" message dated "Sun, 13 Mar 2005 16:10:02 -0300" Date: Sun, 13 Mar 2005 14:21:15 -0500 Message-ID: <18424.1110741675@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/38 X-Sequence-Number: 5367 "Rodrigo Moreno" 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