Re: Implementation of LIMIT on DELETE and UPDATE statements

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Implementation of LIMIT on DELETE and UPDATE statements
Дата
Msg-id 20020925080434.E8681-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Implementation of LIMIT on DELETE and UPDATE statements  (Yury Bokhoncovich <byg@center-f1.ru>)
Список pgsql-patches
On Wed, 25 Sep 2002, Yury Bokhoncovich wrote:

> Hello!
>
> On Mon, 23 Sep 2002, Tom Lane wrote:
>
> > The above is really a perfect example of why this feature isn't safe:
> > it would lead people to make unwarranted assumptions.  The fact that
> > such-and-such a tuple appeared second in the output of LIMIT 10 OFFSET
> > 20 does *not* mean that it would be selected by LIMIT 1 OFFSET 21.  The
>
> Agreed. But if records are inserted by INSERT (times) values (now()) and
> those are selected ORDER BY times - the result is probably well
> determined.;)

Only if you're in serializable isolation mode or if there's never more
than one concurrent update transaction.  Otherwise concurrent updates that
have committed between the select and delete could change the set of rows
you see and therefore the rows you delete. TANSTAAFL unfortunately.


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

Предыдущее
От: Yury Bokhoncovich
Дата:
Сообщение: Re: Implementation of LIMIT on DELETE and UPDATE statements
Следующее
От: Steven Singer
Дата:
Сообщение: contrib/dbmirror bug + doc fix.