Re: Weird behavior with "sensitive" cursors.

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Weird behavior with "sensitive" cursors.
Дата
Msg-id 20090930180910.GH8280@alvh.no-ip.org
обсуждение исходный текст
Ответ на Weird behavior with "sensitive" cursors.  (Daniel F <dbf13db@gmail.com>)
Ответы Re: Weird behavior with "sensitive" cursors.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Daniel F escribió:

> SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE;
> begin;
> show transaction isolation level;
> create table foo (a bigint);
> insert into foo select generate_series(0, 9);
> declare c1 no scroll cursor for select * from foo for update;
> update foo set a=1000 where a>5;
> fetch all from c1;

Interesting.  If I create an non-unique index on the table before
declaring the cursor, FETCH throws an error:

alvherre=# fetch all from c1;
ERROR:  attempted to lock invisible tuple

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Daniel F
Дата:
Сообщение: Weird behavior with "sensitive" cursors.
Следующее
От: György Vilmos
Дата:
Сообщение: Re: Performance evaluation of PostgreSQL's historic releases