Re: setFetchSize() not working

From: Kris Jurka <books(at)ejurka(dot)com>
To: Jeffrey Tenny <jeffrey(dot)tenny(at)comcast(dot)net>
Cc: postgres jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: setFetchSize() not working
Date: 2004-10-10 18:25:09
Message-ID: Pine.BSO.4.56.0410101318300.61@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sun, 10 Oct 2004, Jeffrey Tenny wrote:

> I'm using the 7.3.3 backend, and the JDBC 8.0dev jdbc driver
> (pgdev.306.jdbc3.jar).
>
> I'm calling PreparedStatement.setFetchSize(32), on a table fetching 32KB
> BYTEA records, and I'm blowing out memory on the executeQuery() call
> of the prepared statement.
>
> PreparedStatement.getFetchDirection reports 1000, which is
> ResultSet.FETCH_FORWARD.
>
> Any clues?
>

The development driver has had cursor based fetching support removed when
connecting to servers older than 7.4. The 7.4 release had a new
frontend/backend protocol added which allows for an alternate method of
streaming ResultSets. The 7.4 driver used the old method, but
the development driver was updated to use the new method and in doing that
support for streaming using the old protocol was removed. Your options
seem to be:

- update your server to 7.4 or later
- use the 7.4 driver against your 7.3 server
- figure out had to re-add support for streaming resultsets from old
servers to the new driver.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-10-10 20:20:10 Re: setFetchSize() not working
Previous Message Ulrich Meis 2004-10-10 16:04:53 proposal concerning the bug about updating a table named "two words"