Re: Implementation of LIMIT on DELETE and UPDATE statements
От
Alvaro Herrera
Тема
Re: Implementation of LIMIT on DELETE and UPDATE statements
Дата
Msg-id
Pine.LNX.4.44.0209231329130.2451-100000@cm-lcon1-46-187.cm.vtr.net
Ответ на
Список
Дерево обсуждения
Re: Implementation of LIMIT on DELETE and UPDATE statements Jan Wieck <JanWieck@Yahoo.com>
Tom Lane dijo: > Yury Bokhoncovich writes: > > Imagine typical usage of LIMIT/OFFSET: pagination of a web-output. > > Say, the output is fetched thru "select id,body from articles limit 10 > > offset 20". > > Now, content-admin, surfing the content and looking to the page say 2, > > wanna drop all info on THAT page 2. > > Guess how it could ease the life for programmer?8) I don't understand. It's somewhat more difficult to grab all the primary keys of the currently-selected items (and you can put a Javascript button with "select all in this page"), this I concede. But how is it better to be unsure if you are really deleting what you want to delete? Suppose another admin is also deleting and the LIMIT/OFFSET shifts between the time the page is presented and the button "delete these" is pressed... "Hey, PostgreSQL is stupid," they'll say. "How can they offer such an unsafe misfeature." -- Alvaro Herrera () "God is real, unless declared as int"
В списке pgsql-patches по дате отправления