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 B0372329E63 for ; Mon, 20 Sep 2004 10:45:10 +0100 (BST) 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 71505-04 for ; Mon, 20 Sep 2004 09:45:04 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 5209F329E17 for ; Mon, 20 Sep 2004 10:45:05 +0100 (BST) Received: (qmail 4782 invoked by uid 1112); 20 Sep 2004 09:45:06 -0000 Date: Mon, 20 Sep 2004 04:45:06 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Jens Hillert Cc: pgsql-jdbc@postgresql.org Subject: Re: ResultSet.getFetchsize() In-Reply-To: <24351.1095672862@www49.gmx.net> Message-ID: References: <24351.1095672862@www49.gmx.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/125 X-Sequence-Number: 11015 On Mon, 20 Sep 2004, Jens Hillert wrote: > Hello, > > in previous PostgreSQL JDBC drivers (e.g. 7.3), the Method > ResultSet.getFetchsize() returned the number of results, which were loaded > from the database in a query. This was a complete implementation artifact. The 7.4+ series now has the ability to stream results from the server and doesn't have any idea how many results it will receive until it gets them all, so it can't tell you. > Or is there another way to get the number of results of a query? > You could try ResultSet.moveLast() and then getRow() to determine the number of results. Kris Jurka