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 A94C6DA653 for ; Wed, 9 Nov 2005 17:22:08 -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 92668-08 for ; Wed, 9 Nov 2005 21:22:06 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 32479DA60A for ; Wed, 9 Nov 2005 17:22:06 -0400 (AST) 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 jA9LM8S9019392; Wed, 9 Nov 2005 16:22:08 -0500 (EST) To: Scott Lamb Cc: pgsql-interfaces@postgresql.org Subject: Re: Incremental results from libpq In-reply-to: <4D426B54-E08F-4DE9-9776-D46610CA4968@slamb.org> References: <4D426B54-E08F-4DE9-9776-D46610CA4968@slamb.org> Comments: In-reply-to Scott Lamb message dated "Wed, 09 Nov 2005 11:36:29 -0800" Date: Wed, 09 Nov 2005 16:22:08 -0500 Message-ID: <19391.1131571328@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/12 X-Sequence-Number: 5808 Scott Lamb writes: > Is there a better way? Not at the moment. It's been requested before though, so if you want to develop a patch for libpq, have at it. The main reason why libpq does what it does is that this way we do not have to expose in the API the notion of a command that fails part way through. If you support partial result fetching then you'll have to deal with the idea that a SELECT could fail after you've already returned some rows to the client. I am not sure that this is a huge deal, but it definitely uglifies the API a bit. It would be a good idea to think through exactly what clients will need to do to cope with that fact before you start designing the API extension. regards, tom lane