Re: [GENERAL] DECLARE CURSOR

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: [GENERAL] DECLARE CURSOR
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961EFC@m0114.s-mxs.net
обсуждение исходный текст
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Curtis Faith"
Дата:
Сообщение: Re: btree shrinking again
Следующее
От: Tom Lane
Дата:
Сообщение: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)