Re: Detecting which columns a query will modify in a function calledby a trigger - Mailing list pgsql-general

From David G. Johnston
Subject Re: Detecting which columns a query will modify in a function calledby a trigger
Date
Msg-id CAKFQuwZfx3ZAa9_9X41Yb8-BCTHEG5BO=6JJWaquUgmk8uq8QQ@mail.gmail.com
Whole thread Raw
In response to Re: Detecting which columns a query will modify in a function calledby a trigger  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Detecting which columns a query will modify in a function called by a trigger  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Detecting which columns a query will modify in a function called by a trigger  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
On Tue, Mar 3, 2020 at 4:11 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 3/3/20 3:06 PM, David G. Johnston wrote:
> On Tue, Mar 3, 2020 at 3:48 PM Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     The link was for automatically updateable views. If you want to do
>     something more involved then see:
>
>     https://www.postgresql.org/docs/12/rules-views.html#RULES-VIEWS-UPDATE
>
>
> CREATE TRIGGER works with views; I usually see recommendations to start
> there and avoid rules if at all possible.

The above suggests triggers then rules.

Yeah, I see the buried in there.  The link itself and the page itself is something like 95% rules coverage so it still seems worth pointing out even in hindsight.

Maybe add a link to the CREATE TRIGGER section in there...

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Detecting which columns a query will modify in a function calledby a trigger
Next
From: Tom Lane
Date:
Subject: Re: Poor plan choice with partial unique indexes on jsonb column and simple RLS policy (with test script)