Re: DELETE with LIMIT (or my first hack)
От
Robert Haas
Тема
Re: DELETE with LIMIT (or my first hack)
Дата
Msg-id
AANLkTi=kzCo9yW2pnN7wYQa4DdKHe39atyn+6Aicu2q9@mail.gmail.com
Ответ на
Re: DELETE with LIMIT (or my first hack) (Tom Lane)
Список
Дерево обсуждения
DELETE with LIMIT (or my first hack) Daniel Loureiro <loureirorg@gmail.com>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Jaime Casanova <jaime@2ndquadrant.com>
Re: DELETE with LIMIT (or my first hack) Daniel Loureiro <loureirorg@gmail.com>
Re: DELETE with LIMIT (or my first hack) Jaime Casanova <jaime@2ndquadrant.com>
Re: DELETE with LIMIT (or my first hack) Marti Raudsepp <marti@juffo.org>
Re: DELETE with LIMIT (or my first hack) Rob Wultsch <wultsch@gmail.com>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Andrew Dunstan <andrew@dunslane.net>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Csaba Nagy <ncslists@googlemail.com>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Csaba Nagy <ncslists@googlemail.com>
Re: DELETE with LIMIT (or my first hack) Andrew Dunstan <andrew@dunslane.net>
Re: DELETE with LIMIT (or my first hack) Josh Berkus <josh@agliodbs.com>
Re: DELETE with LIMIT (or my first hack) Daniel Loureiro <daniel@termasa.com.br>
Re: DELETE with LIMIT (or my first hack) "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: DELETE with LIMIT (or my first hack) Andrew Dunstan <andrew@dunslane.net>
Re: DELETE with LIMIT (or my first hack) Peter Eisentraut <peter_e@gmx.net>
Re: DELETE with LIMIT (or my first hack) Bruce Momjian <bruce@momjian.us>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Bruce Momjian <bruce@momjian.us>
Re: DELETE with LIMIT (or my first hack) Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: DELETE with LIMIT (or my first hack) Andres Freund <andres@anarazel.de>
Re: DELETE with LIMIT (or my first hack) Andrew Dunstan <andrew@dunslane.net>
Re: DELETE with LIMIT (or my first hack) Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: DELETE with LIMIT (or my first hack) Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: DELETE with LIMIT (or my first hack) Tom Lane <tgl@sss.pgh.pa.us>
Re: DELETE with LIMIT (or my first hack) Alastair Turner <bell@ctrlf5.co.za>
Re: DELETE with LIMIT (or my first hack) Daniel Loureiro <loureirorg@gmail.com>
Re: DELETE with LIMIT (or my first hack) Alvaro Herrera <alvherre@commandprompt.com>
Re: DELETE with LIMIT (or my first hack) Bruce Momjian <bruce@momjian.us>
Re: DELETE with LIMIT (or my first hack) Daniel Loureiro <loureirorg@gmail.com>
Re: DELETE with LIMIT (or my first hack) Rob Wultsch <wultsch@gmail.com>
Re: DELETE with LIMIT (or my first hack) Mario Weilguni <roadrunner6@gmx.at>
Re: DELETE with LIMIT (or my first hack) "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: DELETE with LIMIT (or my first hack) Dmitriy Igrishin <dmitigr@gmail.com>
Re: DELETE with LIMIT (or my first hack) Valentine Gogichashvili <valgog@gmail.com>
Re: DELETE with LIMIT (or my first hack) Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: DELETE with LIMIT (or my first hack) Tom Lane <tgl@sss.pgh.pa.us>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Tom Lane <tgl@sss.pgh.pa.us>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Jeff Davis <pgsql@j-davis.com>
Re: DELETE with LIMIT (or my first hack) Robert Haas <robertmhaas@gmail.com>
Re: DELETE with LIMIT (or my first hack) Jeff Davis <pgsql@j-davis.com>
Re: DELETE with LIMIT (or my first hack) Tom Lane <tgl@sss.pgh.pa.us>
On Tue, Nov 30, 2010 at 11:04 AM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Nov 30, 2010 at 10:04 AM, Tom Lane wrote: >>> Unfortunately, the UPDATE >>> case would be an order of magnitude harder (think inheritance trees >>> where the children aren't all alike). > >> I don't understand why there's anything more to this than sticking a >> Limit node either immediately above or immediately below the >> ModifyTable node. > > 1. You need to support ORDER BY too, otherwise I *will* be on the > warpath against this as a foot-gun with no redeeming social value. Will you be wielding a Tom-ahawk? > 2. So what you need is Sort underneath Limit underneath ModifyTable. > Putting them above it would be quite the wrong semantics. OK. > 3. This doesn't work tremendously well for inheritance trees, where > ModifyTable acts as sort of an implicit Append node. You can't just > funnel all the tuples through one Sort or Limit node because they aren't > all the same rowtype. (Limit might perhaps not care, but Sort will.) > But you can't have a separate Sort/Limit for each table either, because > that would give the wrong behavior. Another problem with funneling all > the rows through one Sort/Limit is that ModifyTable did need to know > which table each row came from, so it can apply the modify to the right > table. Could you possibly have ModifyTable -> Limit -> MergeAppend? > Or I guess you could try to persuade us that DELETE/UPDATE with ORDER BY > or LIMIT doesn't need to support inherited target tables. I wouldn't > bet on that proposal flying either. I've spent enough time worrying about the fact that tables with inheritance children don't behave as nicely as those that don't to have any interest in going in the other direction. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления