Re: allow LIMIT in UPDATE and DELETE

Поиск
Список
Период
Сортировка
Искать
От
Csaba Nagy
Тема
Re: allow LIMIT in UPDATE and DELETE
Дата
в 11:42:33
Msg-id
1148049740.17461.413.camel@coppola.muc.ecircle.de
Ответ на
Список
Дерево обсуждения
Re: allow LIMIT in UPDATE and DELETE SCassidy@overlandstorage.com
Re: allow LIMIT in UPDATE and DELETE Csaba Nagy <nagy@ecircle-ag.com>
Re: allow LIMIT in UPDATE and DELETE Shelby Cain <alyandon@yahoo.com>
Re: allow LIMIT in UPDATE and DELETE Csaba Nagy <nagy@ecircle-ag.com>
Re: allow LIMIT in UPDATE and DELETE Shelby Cain <alyandon@yahoo.com>
Re: allow LIMIT in UPDATE and DELETE "Jim C. Nasby" <jnasby@pervasive.com>
Re: allow LIMIT in UPDATE and DELETE Csaba Nagy <nagy@ecircle-ag.com>
Re: allow LIMIT in UPDATE and DELETE "Jim C. Nasby" <jnasby@pervasive.com>
Re: allow LIMIT in UPDATE and DELETE Csaba Nagy <nagy@ecircle-ag.com>
Re: allow LIMIT in UPDATE and DELETE Shelby Cain <alyandon@yahoo.com>
Re: allow LIMIT in UPDATE and DELETE "Jim C. Nasby" <jnasby@pervasive.com>
Re: allow LIMIT in UPDATE and DELETE Shelby Cain <alyandon@yahoo.com>
On Fri, 2006-05-19 at 16:31, Tom Lane wrote:
> Csaba Nagy  writes:
> > I DO NOT CARE about which rows are deleted.
> 
> You can't possibly think that that holds true in general.

I agree that it is not true in the general case, but then I also don't
want to use DELETE with LIMIT in the general case. I only want to use it
in the very specific cases where it makes sense, and it results in
cleaner SQL, and it would likely result in a better execution plan.

> I can tolerate nondeterminism in SELECT because it doesn't change the
> data.  If you get it wrong you can always do it over.  UPDATE/DELETE
> need to have higher standards though.

Please Tom, there are so many ways you can shoot your feet already in
there... I don't see why this one would be a bigger foot-gun then the
subquery stile. It is functionally equivalent. It's only easier to
write... if somebody wants to shoot himself, he can do it one way or the
other. Placing a big warning on the docs should be enough... 
except if postgres is really targeting the MySql users instead of the
Oracle folks. Those guys already have this foot-gun readily loaded...
where's the American spirit where you are allowed to carry guns and
expected to act responsible ?

Cheers,
Csaba.


В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Shelby Cain
Дата:
FAQ