Re: JDBC3 + HOLD_CURSORS_OVER_COMMIT

Lists: pgsql-jdbc
From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: JDBC3 + HOLD_CURSORS_OVER_COMMIT
Date: 2004-07-20 21:38:58
Message-ID: 40FD90F2.1010006@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

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..

-O


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Oliver Jowett <oliver(at)opencloud(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC3 + HOLD_CURSORS_OVER_COMMIT
Date: 2004-07-20 21:49:13
Message-ID: 200407202349.13775.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

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.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC3 + HOLD_CURSORS_OVER_COMMIT
Date: 2004-07-20 21:53:07
Message-ID: 40FD9443.7000301@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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