Re: JDBC3 + HOLD_CURSORS_OVER_COMMIT - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: JDBC3 + HOLD_CURSORS_OVER_COMMIT
Date
Msg-id 40FD9443.7000301@opencloud.com
Whole thread Raw
In response to Re: JDBC3 + HOLD_CURSORS_OVER_COMMIT  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-jdbc
Peter Eisentraut wrote:
> Oliver Jowett wrote:
>
>>It occurred to me that we can support JDBC3's
>>HOLD_CURSORS_OVER_COMMIT behaviour quite simply by doing the same
>>thing we do with scrollable resultsets -- disable use of cursors
>>entirely.
>>
>>Does this sound worth doing? Obviously we could replace it with
>>proper WITH HOLD cursor-backed resultsets eventually..
>
>
> PostgreSQL 7.4 supports holdable cursors.

Yes, but the JDBC driver doesn't have the necessary logic to use them --
it always uses V3 protocol-level portals which can't be made WITH HOLD.

Disabling cursor use when the JDBC app wants a holdable cursor is a
small change. Adding support for cursors via DECLARE is a big change.

(also see my soon-to-be-sent message about V3 + DECLARE -- using DECLARE
looks like it's not an option for us currently)

-O

pgsql-jdbc by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: JDBC3 + HOLD_CURSORS_OVER_COMMIT
Next
From: Oliver Jowett
Date:
Subject: V3 protocol + DECLARE problems