Re: [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY
Дата
Msg-id CAMkU=1znKFeTv_DgbMOt2gyGe8p7Js7Qcg4Gb16naFHZeD1H9Q@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY  (Surafel Temesgen <surafel3000@gmail.com>)
Ответы Re: [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY
Список pgsql-hackers
On Mon, Apr 24, 2017 at 8:09 AM, Surafel Temesgen <surafel3000@gmail.com> wrote:
the necessity of allowing limit and order by clause to be used with delete and 
update statement is discussed in the past and added to the todo list 

preveouse mailing list descissions
 

See this more recent one:


That patch was not adopted, as I recall, mostly due to the requirement that it support partitioned tables.
 
i attached a small patch for its implementation.

Notice : inorder to avoid unpredictable result the patch did not allow limit clause without order by and vise versal.

I think both of those are ill-advised.  To avoid deadlock, it is perfectly fine to want an order by without a limit.

And to facilitate the reorganization of partitions or the population of new columns in bite-size chunks, it is also fine to want limit without order by.

Cheers,

Jeff

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] to-do item for explain analyze of hash aggregates?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Unportable implementation of background worker start