X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5736FDBDA6 for ; Tue, 22 Nov 2005 18:33:19 -0400 (AST) 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 06531-02 for ; Tue, 22 Nov 2005 22:33:20 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 64654DBD91 for ; Tue, 22 Nov 2005 18:33:16 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id jAMMXI925739; Tue, 22 Nov 2005 17:33:18 -0500 (EST) From: Bruce Momjian Message-Id: <200511222233.jAMMXI925739@candle.pha.pa.us> Subject: Re: Not clear on what PQgetResult does In-Reply-To: <20051117211635.GD10976@surnet.cl> To: Alvaro Herrera Date: Tue, 22 Nov 2005 17:33:18 -0500 (EST) CC: David Rysdam , pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.03 required=5 tests=[AWL=0.030] X-Spam-Score: 0.03 X-Spam-Level: X-Archive-Number: 200511/62 X-Sequence-Number: 5858 Alvaro Herrera wrote: > David Rysdam wrote: > > Joshua D. Drake wrote: > > > > >>>It isn't. You can use it in an asynchronous client, but the way you do > > >>>that is by not calling it until PQisBusy says you can (which means the > > >>>whole result has arrived, and you're just calling PQgetResult to get > > >>>hold of it). > > >>> > > >>So there's no way to have libpq return partial results before they > > >>are all ready? > > >> > > >>If I may, I would like to express some degree of incredulity. Even > > >>the version of Sybase I'm using does this right and it's from 1997! > > > > > >I am sure we would welcome a patch ;)) > > > > To be honest, this is almost enough to drive me away from PG. > > If you are in need of partial results you may as well use a cursor and > fetch from it, a bunch at a time. Right, this is the standard way. > > Or are there underlying server reasons why this won't work? > > This topic was discussed four days ago I think ... look for a thread > with subject "Incremental results from libpq" on the archives of this > list. That thread has already been condensed into a TODO entry. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073