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

From: Vik Fearing <vik(at)2ndquadrant(dot)fr>
To: David Fetter <david(at)fetter(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Date: 2016-07-26 22:14:51
Message-ID: 07ab32b2-6580-3476-92e8-838c8b00df84@2ndquadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21/07/16 06:57, David Fetter 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?

I say I don't like this at all.

As mentioned elsewhere in the thread, you can just do WHERE true to get
around it, so why on Earth have it PGC_SUSET?

I would rather, if we need nannying at all, have a threshold of number
of rows affected. So if your update or delete exceeds that threshold,
the query will be canceled.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2016-07-26 22:17:38 Re: Why we lost Uber as a user
Previous Message Tom Lane 2016-07-26 22:07:33 Re: Why we lost Uber as a user