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 A08BADB5FC for ; Sun, 13 Nov 2005 11:23:32 -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 36618-05 for ; Sun, 13 Nov 2005 15:23:28 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by svr1.postgresql.org (Postfix) with ESMTP id DEA23DB5CF for ; Sun, 13 Nov 2005 11:23:30 -0400 (AST) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 13 Nov 2005 12:25:55 -0300 X-IronPort-AV: i="3.97,319,1125892800"; d="scan'208"; a="26051050:sNHT19314256" Received: from alvh.no-ip.org (216.155.78.23) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43501597003B6830; Sun, 13 Nov 2005 12:23:35 -0300 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 40401C2D450; Sun, 13 Nov 2005 12:24:01 -0300 (CLST) Date: Sun, 13 Nov 2005 12:24:01 -0300 From: Alvaro Herrera To: "Goulet, Dick" Cc: Frank van Vugt , Greg Stark , pgsql-interfaces@postgresql.org Subject: Re: Incremental results from libpq Message-ID: <20051113152401.GB31570@surnet.cl> Mail-Followup-To: "Goulet, Dick" , Frank van Vugt , Greg Stark , pgsql-interfaces@postgresql.org References: <4001DEAF7DF9BD498B58B45051FBEA6502EF5389@25exch1.vicorpower.vicr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4001DEAF7DF9BD498B58B45051FBEA6502EF5389@25exch1.vicorpower.vicr.com> User-Agent: Mutt/1.5.10i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.864 required=5 tests=[AWL=-0.382, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, RCVD_IN_NJABL_PROXY=0.327] X-Spam-Score: 1.864 X-Spam-Level: * X-Archive-Number: 200511/21 X-Sequence-Number: 5817 Goulet, Dick wrote: > For a simple "select * from " even with a where > clause you may simply get the results one row at a time as they are > extracted & deemed appropriate for the result set. But if you've > included a group by or order by clause, or a union/intersect/minus > clause then yes, the database will assemble results before sending them > to the client. So, what happens with the 1/x query Tom mentioned? How does Oracle handles that situation? Notice there's no special clause in the query itself, so if it's extracted and returned, there's no way for the server to know that there's a problem laying ahead. > Also Oracle supports cursors which allow you to pop one or more > rows off of the result set at a time. The way Postgresql returns data > all at once is different. Postgres supports cursors too. The Qt guys, and everyone else, could be using it to get incremental results right now, no libpq mods necessary. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.