Re: LIMIT for UPDATE and DELETE

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: LIMIT for UPDATE and DELETE
Дата
Msg-id CAMkU=1xQ5bDvKSc=OsRtFvJfMYF3dSsDE-kg8cz_1PiDDbFbyw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LIMIT for UPDATE and DELETE  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
On Tue, Sep 9, 2014 at 2:57 AM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
 
I agree. If we are to support UPDATE .. ORDER BY .. LIMIT, it should work with inheritance. So the path forward is (using Marko's phrasing upthread):

   1) We put the LIMIT inside ModifyTable like this patch does.  This
doesn't prevent us from doing ORDER BY in the future, but helps numerous
people who today have to
   2) Someone rewrites how UPDATE works based on Tom's suggestion here:
http://www.postgresql.org/message-id/1598.1399826841@sss.pgh.pa.us,
which allows us to support ORDER BY on all tables (or perhaps maybe not
FDWs, I don't know how those work).  The LIMIT functionality in this
patch is unaffected.

What's not clear to me is whether it make sense to do 1) without 2) ? Is UPDATE .. LIMIT without support for an ORDER BY useful enough?

I've wanted LIMIT even without ORDER BY many times, so I'd vote yes.

 
And if we apply this patch now, how much of it needs to be rewritten after 2) ? If the answers are "yes" and "not much", then we should review this patch now, and put 2) on the TODO list. Otherwise 2) should do done first.

On that I can't give any useful feedback. 


Cheers,

Jeff

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [Fwd: Re: proposal: new long psql parameter --on-error-stop]
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: pg_background (and more parallelism infrastructure patches)