X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D5DE9D7793 for ; Mon, 29 Aug 2005 19:24:20 -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 15465-10 for ; Mon, 29 Aug 2005 22:24:17 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 2E0C8D6F5F for ; Mon, 29 Aug 2005 19:24:12 -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 1E9s2i-0002os-Nt; Tue, 30 Aug 2005 10:23:52 +1200 Message-ID: <43138AFC.20305@opencloud.com> Date: Tue, 30 Aug 2005 10:23:56 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Clemens Eisserer Cc: pgsql-jdbc@postgresql.org Subject: Re: NullPointerException when calling ResultSet.absolute(int) References: <194f625505082810015456609c@mail.gmail.com> <43122F3E.3040002@opencloud.com> <194f625505082904281f3ca75@mail.gmail.com> In-Reply-To: <194f625505082904281f3ca75@mail.gmail.com> 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.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200508/201 X-Sequence-Number: 13770 Clemens Eisserer wrote: > Hello Oliver and thanks a lot for answering, > > >>Either you can use two queries, or use a scrollable ResultSet and call >>ResultSet.last() / ResultSet.getRow(). The second approach causes the >>entire ResultSet to be loaded into the Java heap, though, so it's not so >>good for large results. > > Currently I use the last()/getRow approach but as you confirmed this > approach does exactly what I don't want - to transfer the whole > selection between server and client. > Isn't there a workarround for this, maybe setting the fetch-size > (default set to 0)? Not with the current driver -- using a scrollable resultset disables use of cursors, so the fetchsize is ignored. -O