Implementation of LIMIT on DELETE and UPDATE statements (rel to 7.2.1)
От | srb@cuci.nl (Stephen R. van den Berg) |
---|---|
Тема | Implementation of LIMIT on DELETE and UPDATE statements (rel to 7.2.1) |
Дата | |
Msg-id | 20020921141206.GA32585@cuci.nl обсуждение исходный текст |
Ответы |
Re: Implementation of LIMIT on DELETE and UPDATE statements (rel to 7.2.1)
|
Список | pgsql-patches |
The patch allows for a LIMIT clause on a DELETE or UPDATE statement. Why is this needed? - I have a table which has several identical entries, and I want to delete or update just one of them (I don't care which one, obviously). And, no, I cannot use OIDS because they'd represent unwanted overhead (the table contains a lot of entries). - It allows you to speed up DELETE or UPDATE statements which are known in advance to match only one record by adding a LIMIT 1. - It makes migrations from MySQL to PostgreSQL easier (MySQL already supports LIMIT on DELETEs and UPDATEs). It might simplify other migrations as well, I'm not sure what other DBMSes support the construct. The patch includes documentation updates (which might need to be edited to change the look and feel to the rest of the documentation). When checking the patches, please pay attention to the three extra warnings the yacc file now generates. I looked into it, but can't see the problem, actually (I'm probably overlooking something). -- Sincerely, srb@cuci.nl Stephen R. van den Berg (AKA BuGless). "Sleep: A completely inadequate substitute for caffeine."
Вложения
В списке pgsql-patches по дате отправления: