Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Date
Msg-id CAA4eK1JMWsq5J8snZwjgEoQerNkuJ8GKfh7=NCuXTyUXDpzevw@mail.gmail.com
Whole thread Raw
In response to PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (David Fetter <david@fetter.org>)
Responses Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (Craig Ringer <craig@2ndquadrant.com>)
List 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 by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Oddity in handling of cached plans for FDW queries
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [BUG] pg_basebackup from disconnected standby fails