On Mon, Apr 24, 2017 at 8:09 AM, Surafel Temesgen <surafel3...@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 > > http://archives.postgresql.org/pgadmin-hackers/2010-04/msg00078.php > http://archives.postgresql.org/pgsql-hackers/2010-11/msg01997.php > See this more recent one: https://www.postgresql.org/message-id/flat/54102581.2020207%40joh.to#54102581.2020...@joh.to 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