Re: setFetchSize

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: setFetchSize
Date: 2011-10-26 23:34:10
Message-ID: CA+0W9LO5Q_icnHoYF8PyE6Aez0k__JjzAiREF=8=JWBZ8CxYsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 27 October 2011 12:18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Stevo Slavić 2011-10-28 12:20:44 Publish 9.1-901 JDBC drivers on maven central
Previous Message Tom Lane 2011-10-26 23:18:20 Re: setFetchSize