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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Date: 2017-02-02 16:40:17
Message-ID: 20170202164017.vvmsouxwievfwycu@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule wrote:

> Identification of unjoined tables should be very useful - but it is far to
> original proposal - so it can be solved separately.
>
> This patch is simple - and usually we prefer more simple patches than one
> bigger.
>
> Better to enhance this feature step by step.

Agreed -- IMO this is a reasonable first step, except that I would
rename the proposed extension so that it doesn't focus solely on the
first step. I'd pick a name that suggests that various kinds of checks
are applied to queries, so "require_where" would be only one of various
options that can be enabled. It will make no sense to enable the
require_where module in order to disallow unjoined tables. At the same
time, I don't see us providing a dozen of "require_foo" modules. So
we'd better start making this one extensible from the get go.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-02-02 16:44:56 Re: Index corruption with CREATE INDEX CONCURRENTLY
Previous Message Konstantin Knizhnik 2017-02-02 16:27:53 Re: Deadlock in XLogInsert at AIX