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

From Peter Eisentraut
Subject Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Date
Msg-id 370b84e1-c6eb-4f43-f90d-10f1a7a4d332@2ndquadrant.com
Whole thread Raw
In response to Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (Vik Fearing <vik@2ndquadrant.fr>)
Responses Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (Vik Fearing <vik@2ndquadrant.fr>)
Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (Peter van Hardenberg <pvh@pvh.ca>)
List pgsql-hackers
On 7/26/16 6:14 PM, Vik Fearing wrote:
> 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'm not sure whether it's supposed to guard against typos and possibly
buggy SQL string concatenation in application code.  So it would help
against accidental mistakes, whereas putting a WHERE TRUE in there would
be an intentional override.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Proposal: revert behavior of IS NULL on row types
Next
From: Vik Fearing
Date:
Subject: Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE