Re: [GENERAL] DECLARE CURSOR

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "snpe" <snpe(at)snpe(dot)co(dot)yu>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] DECLARE CURSOR
Date: 2002-11-18 16:32:25
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4961EFC@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > is it planed cursor out of a transaction in 7.4 ?
>
> I do not think we will allow cross-transaction cursors ever.
> What would
> it mean to have a cross-transaction cursor, anyway? Does it show a
> frozen snapshot as of the time it was opened? The usefulness of that
> seems awfully low in comparison to the pain of implementing it.

It is usually used with comitted read isolation for an outer select
on one table and one transaction per row where the action usually involving
additional tables depends on the selected row. This is to keep transactions
small and avoid locking out other activity.

The outer cursor is declared "WITH HOLD".
I think it is a useful feature.

Of course a workaround is to open two connections.

Andreas

Browse pgsql-hackers by date

  From Date Subject
Next Message Tim Bunce 2002-11-18 16:39:08 Re: DBD::PostgreSQL
Previous Message David Wheeler 2002-11-18 16:27:33 Re: DBD::PostgreSQL