Re: Determining if a table really changed in a trigger - Mailing list pgsql-general

From Mitar
Subject Re: Determining if a table really changed in a trigger
Date
Msg-id CAKLmikOm34j2ZyDEbz63ZZ81NXqoma_tbsBqGHO9XReR7-R0+A@mail.gmail.com
Whole thread Raw
In response to Re: Determining if a table really changed in a trigger  (Marcos Pegoraro <marcos@f10.com.br>)
List pgsql-general
Hi!

On Wed, Oct 27, 2021 at 12:56 PM Marcos Pegoraro <marcos@f10.com.br> wrote:
>> Oh, very interesting. I thought that this is not possible because WHEN
>> condition on triggers does not have NEW and OLD. But this is a very
>> cool way to combine rules with triggers, where a rule can still
>> operate by row.
>
> That is not true

Sorry to be imprecise. In this thread I am interested in statement
triggers, so I didn't mention this explicitly here. So statement
triggers do not have NEW and OLD. But you can combine it with a
row-level rule and this works then well together.


Mitar

-- 
http://mitar.tnode.com/
https://twitter.com/mitar_m



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump and pg_restore and foreign keys
Next
From: Tore Halvorsen
Date:
Subject: Re: pg_dump and pg_restore and foreign keys