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

From: David Fetter <david(at)fetter(dot)org>
To: Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Date: 2016-09-30 19:12:32
Message-ID: 20160930191232.GB9774@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 30, 2016 at 06:37:17PM +0200, Julien Rouhaud wrote:
> On 30/09/2016 05:23, Thomas Munro wrote:
> >
> > It would be really nice to be able to set this to 'Ready for
> > Committer' in this CF. Do you want to post a v6 patch or are you
> > happy for me to ask a committer to look at v5 + these three
> > corrections?
>
> I just looked at the patch, and noticed that only plain DELETE and
> UPDATE commands are handled. Is it intended that writable CTE without
> WHERE clauses are not detected by this extension? I personally think
> that wCTE should be handled (everyone can forget a WHERE clause), but if
> not it should at least be documented.

You are correct in that it should work for every unqualified UPDATE or
DELETE, not just some. Would you be so kind as to send along the
tests cases you used so I can add them to the patch?

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-09-30 19:15:29 Re: [GENERAL] C++ port of Postgres
Previous Message Stephen Frost 2016-09-30 19:06:11 Re: pgbench more operators & functions