DELETE with LIMIT (or my first hack)

Поиск
Список
Период
Сортировка
От Daniel Loureiro
Тема DELETE with LIMIT (or my first hack)
Дата
Msg-id AANLkTi=6fBZh9yZT7f7kKh+zmQngAyHgZWBPM3eiEMj1@mail.gmail.com
обсуждение исходный текст
Ответы Re: DELETE with LIMIT (or my first hack)  (Jaime Casanova <jaime@2ndquadrant.com>)
Re: DELETE with LIMIT (or my first hack)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,<br /><br />frequently i have accidents with DELETE/UPDATE commands. In fact, sometimes in the last 8 or 9 years
(ok,a lot of times) I forget the entire WHERE clause or have a “not so perfectly“ WHERE clause, with an awful suprise.
There’sno words to figure the horror ever time i see that the number of affected rows its not 1 or two how expected,
butthe entire table. So I planned to make a hack to make the “LIMIT” directive available to “DELETE” command.<br /><br
/>So,can anyone help-me in how to do this ? This its my plan: 1) change the lex grammar (wheres the file ?) 2) change
theparser to accept the new grammar 3) change the executor to stop after “n” successful iterations. Is this correct
?<br/><br />Greets,<br />--<br /><br />Daniel Loureiro<br />------------------------------<br /><a
href="http://diffcoder.blogspot.com/">http://diffcoder.blogspot.com/</a><br/> 

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: profiling connection overhead
Следующее
От: Itagaki Takahiro
Дата:
Сообщение: Re: dblink versus long connection strings