Re: setFetchSize() not working - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: setFetchSize() not working
Date
Msg-id Pine.BSO.4.56.0410101318300.61@leary.csoft.net
Whole thread Raw
In response to setFetchSize() not working  (Jeffrey Tenny <jeffrey.tenny@comcast.net>)
List 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


pgsql-jdbc by date:

Previous
From: "Serguei Mokhov"
Date:
Subject: Re: New jdbc website
Next
From: Kris Jurka
Date:
Subject: Re: Using gettext