Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Дата
Msg-id CAA4eK1JMWsq5J8snZwjgEoQerNkuJ8GKfh7=NCuXTyUXDpzevw@mail.gmail.com
обсуждение исходный текст
Ответ на PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (David Fetter <david@fetter.org>)
Ответы Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Jul 21, 2016 at 10:27 AM, David Fetter <david@fetter.org> wrote:
> Folks,
>
> Please find attached a patch which makes it possible to disallow
> UPDATEs and DELETEs which lack a WHERE clause.  As this changes query
> behavior, I've made the new GUCs PGC_SUSET.
>
> What say?
>

The use case for this functionality that comes to mind is to avoid
deleting/updating all the data, if user has accidentally missed the
WHERE clause.  Do you have other use case for this functionality?
With this functionality, if user needs to actually delete or update
all the rows, then he has to artificially add where clause which seems
slightly inconvenient, but may be such cases are less.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Oddity in handling of cached plans for FDW queries
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [BUG] pg_basebackup from disconnected standby fails