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 506663A5989 for ; Thu, 2 Dec 2004 21:15:15 +0000 (GMT) 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 11457-10 for ; Thu, 2 Dec 2004 21:15:04 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 430F13A593F for ; Thu, 2 Dec 2004 21:15:00 +0000 (GMT) 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 (Exim 3.35 #1 (Debian)) id 1CZyHt-0005Nq-00; Fri, 03 Dec 2004 10:14:53 +1300 Message-ID: <41AF8727.90404@opencloud.com> Date: Fri, 03 Dec 2004 10:20:39 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.9 (X11/20041130) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Smith Cc: pgsql-jdbc@postgresql.org Subject: Re: Bug in setFetchSize References: <1102005138.4563.9.camel@playpen.candata.com> In-Reply-To: <1102005138.4563.9.camel@playpen.candata.com> X-Enigmail-Version: 0.89.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/7 X-Sequence-Number: 11673 Dave Smith wrote: > We are using pg80b1.308.jdbc3.jar with pg 7.4.5 and trying to use > setFetchSize on Statement. > > Once we try and fetch outside the value we have set for fetchSize we get > ERROR: portal "C_4" does not exist The only case I can think of this happening is if you are trying to use a ResultSet after the transaction that created it has committed or rolled back. You're not meant to do that unless you specify HOLD_CURSORS_OVER_COMMIT (which the driver will currently reject as unsupported). The driver does not explicitly close ResultSets on commit, but the server closes the underlying cursor so you see this error. If that's not the scenario, can you provide some sample code that demonstrates the problem? > So it looks like you are using fetchSize as an absolute size, which is > not my reading of the spec. I don't understand your analysis. -O