X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BBD31D1B22B for ; Tue, 11 May 2004 22:15:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 99297-02 for ; Tue, 11 May 2004 22:15:29 -0300 (ADT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id DC489D1D524 for ; Tue, 11 May 2004 22:15:25 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1BNiLD-0008M4-00; Wed, 12 May 2004 13:15:23 +1200 Message-ID: <40A17AA6.5070209@opencloud.com> Date: Wed, 12 May 2004 13:15:18 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sean Shanny Cc: David Wall , pg@fastcrypt.com, pgsql-jdbc@postgresql.org Subject: Re: JDBC and processing large numbers of rows References: <20040511103520.1ADC6D1B1EE@svr1.postgresql.org> <40A0CB55.5060400@opencloud.com> <024101c4376d$d567d050$3201a8c0@rasta> <1084305394.1534.121.camel@localhost.localdomain> <036601c43797$4312ee40$3201a8c0@rasta> <1084315868.1536.132.camel@localhost.localdomain> <03f401c437b6$1bb615b0$3201a8c0@rasta> <40A17610.7040600@earthlink.net> In-Reply-To: <40A17610.7040600@earthlink.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/65 X-Sequence-Number: 10075 Sean Shanny wrote: > Make sure you do not end your SQL with a ; (semi colon) as that will > cause the fetching part not to work. Don't know why but it does. :-) Technically, "SELECT foo;" is two statements, "SELECT foo" and "", as JDBC doesn't require a statement terminator. The (simple-minded) JDBC query parser doesn't do anything special to ignore trailing empty statements. And you can't DECLARE a cursor that runs two statements.. so the driver says "two statements, can't use a cursor!". -O