Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
David Fetter <david@fetter.org>
From: David Fetter <david@fetter.org>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2017-01-05T05:58:26Z
Lists: pgsql-hackers
Attachments
- training_wheels_007.patch (text/plain) patch
- (unnamed) (text/plain)
On Sun, Jan 01, 2017 at 07:57:33PM +0900, Michael Paquier wrote: > On Sun, Jan 1, 2017 at 12:34 PM, David Fetter <david@fetter.org> wrote: > > 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. > > Is there actually a meaning to have two options? Couldn't we leave > with just one? Actually, I'd just suggest to rip off the option and > just to make the checks enabled when the library is loaded, to get a > module as simple as passwordcheck. Done. > --- /dev/null > +++ b/contrib/require_where/data/test_require_where.data > @@ -0,0 +1,16 @@ > +Four > There is no need to load fake data as you need to just check the > parsing of the query. So let's simplify the tests and remove that. Removed. > Except that the shape of the module is not that bad. The copyright > notices need to be updated to 2017, and it would be nice to have some > comments at the top of require_where.c to describe what it does. Please find attached the next version of the patch including Pavel's suggestion that I provide some motivation for including those Asserts. 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