Skip site navigation (1) Skip section navigation (2)

Re: ResultSet.getFetchsize()

From: Kris Jurka <books(at)ejurka(dot)com>
To: Jens Hillert <hillertj(at)gmx(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: ResultSet.getFetchsize()
Date: 2004-09-20 09:45:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

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

In response to

pgsql-jdbc by date

Next:From: John R PierceDate: 2004-09-20 15:52:29
Subject: Re: "Idle in Transaction" revisited.
Previous:From: Jens HillertDate: 2004-09-20 09:34:22
Subject: ResultSet.getFetchsize()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group