Re: setFetchSize - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: setFetchSize
Date
Msg-id CA+0W9LO5Q_icnHoYF8PyE6Aez0k__JjzAiREF=8=JWBZ8CxYsg@mail.gmail.com
Whole thread Raw
In response to Re: setFetchSize  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
On 27 October 2011 12:18, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Bottom line from a server-side point of view is that if you want that
> overhead, you can ask for it, by opening a held cursor.  It might be
> sensible for JDBC to provide that functionality with something that
> looks as much as possible like an ordinary resultset --- but I'm pretty
> certain it shouldn't be the default behavior on the JDBC side either.

We'd only do this if HOLD_CURSORS_OVER_COMMIT (which isn't the
default) was explicitly set on the resultset.

It really would be useful to specify something equivalent to WITH HOLD
on a portal though - trying to work out how to transform an arbitrary
query into a DECLARE CURSOR is the sort of SQL mangling the driver
tries to avoid doing. (It did exactly that back in the 7.3 / protocol
version 2 days and there were all sorts of nasty edge cases)

Oliver

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: setFetchSize
Next
From: Stevo Slavić
Date:
Subject: Publish 9.1-901 JDBC drivers on maven central