X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D217352A04 for ; Tue, 19 Jul 2005 21:22:48 -0300 (ADT) 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 15175-03 for ; Wed, 20 Jul 2005 00:22:47 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 7623152A57 for ; Tue, 19 Jul 2005 21:22:46 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Dv2MM-0001Nd-Av; Wed, 20 Jul 2005 12:22:50 +1200 Message-ID: <42DD9959.7090204@opencloud.com> Date: Wed, 20 Jul 2005 12:22:49 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Grittner Cc: pgsql-jdbc@postgresql.org Subject: Re: Streaming ResultSet References: In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.56 tagged_above=0 required=5 tests=AWL, ITS_LEGAL X-Spam-Level: X-Archive-Number: 200507/155 X-Sequence-Number: 13303 Kevin Grittner wrote: > The disadvantages of the current default approach are: > (2) You might want to see partial results from a query which ultimately > generates an exception. I don't see this is something that any sort of portable application is ever going to need. It's very unpredictable where you get an error if an error occurs, since it's so dependent on backend / driver / protocol implementations. > The disadvantages of the cursored approach are: > (1) It might not be easy to create all of the right conditions for the > cursored approach to work. It occurs to me that the only condition that streaming would mitigate is having to have autocommit off. You can't usefully use streaming with TYPE_SCROLLABLE_* resultsets as even though you can stream results just fine while the resultset current-row is moving strictly forward, you have to keep all previously retrieved results in memory anyway in case the application asks to move backwards (perfectly legal with a SCROLLABLE resultset). Keeping the whole resultset in memory defeats the purpose of streaming in the first place.. -O