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

From: David Fetter <david(at)fetter(dot)org>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: 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: 2017-01-01 03:34:00
Message-ID: 20170101033400.GA19240@fetter.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Fri, Sep 30, 2016 at 04:23:13PM +1300, Thomas Munro wrote:
> On Thu, Sep 29, 2016 at 6:19 PM, David Fetter <david(at)fetter(dot)org> wrote:
> > On Thu, Sep 29, 2016 at 11:12:11AM +1300, Thomas Munro wrote:
> >> On Mon, Sep 26, 2016 at 5:11 PM, Thomas Munro
> >> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> >> > On Mon, Sep 26, 2016 at 1:18 PM, Thomas Munro
> >> > <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> >> >>
> >> >> On Mon, Sep 19, 2016 at 4:02 PM, David Fetter <david(at)fetter(dot)org> wrote:
> >> >> >
> >> >> > [training_wheels_004.patch]
> >> >>
> >> >> [review]
> >>
> >> Ping.
> >
> > Please find attached the next revision.
>
> I'm not sold on ERRCODE_SYNTAX_ERROR. There's nothing wrong with the
> syntax, since parsing succeeded. It would be cool if we could use
> ERRCODE_E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED, though I'm not sure
> what error class 38 really means. Does require_where's hook function
> count as an 'external routine' and on that basis is it it allowed to
> raise this error? Thoughts, anyone?
>
> I am still seeing the underscore problem when building the docs.
> Please find attached fix-docs.patch which applies on top of
> training_wheels_005.patch. It fixes that problem for me.
>
> The regression test fails. The expected error messages show the old
> wording, so I think you forgot to add a file. Also, should
> contrib/require_where/Makefile define REGRESS = require_where? That
> would allow 'make check' from inside that directory, which is
> convenient and matches other extensions. Please find attached
> fix-regression-test.patch which also applies on top of
> training_wheels_005.patch and fixes those things for me, and also adds
> a couple of extra test cases.
>
> Robert Haas mentioned upthread that the authors section was too short,
> and your follow-up v3 patch addressed that. Somehow two authors got
> lost on their way to the v5 patch. Please find attached
> fix-authors.patch which also applies on top of
> training_wheels_005.patch to restore them.
>
> 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?

Thanks!

I've rolled your patches into this next one and clarified the commit
message, as there appears to have been some confusion about the scope.

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

Attachment Content-Type Size
training_wheels_006.patch text/plain 9.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2017-01-01 09:38:29 An isolation test for SERIALIZABLE READ ONLY DEFERRABLE
Previous Message Michael Paquier 2016-12-31 23:51:18 Re: Commit fest 2017-01 will begin soon!