Re: bug w/ cursors and savepoints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bug w/ cursors and savepoints
Дата
Msg-id 23440.1106783973@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bug w/ cursors and savepoints  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> On Wed, 2005-01-26 at 12:02 -0300, Alvaro Herrera wrote:
>> Hmm ... not sure how hard that is.

> Would it work to record the sub XID of the deleting subtxn on CLOSE, and
> then consider whether to "really" do the deletion when the subtxn
> commits/aborts?

It'd take more than that.  Consider
BEGIN;DECLARE c CURSOR ...;SAVEPOINT x;    CLOSE c;    DECLARE c CURSOR ...;    -- draws duplicate-cursor error

You'd need to do something to "hide" the deleted cursor for the
remainder of its subtransaction.
        regards, tom lane


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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: bug w/ cursors and savepoints
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Data statement format used by the .sh scripts