Re: Determining if a table really changed in a trigger

From: Mitar <mmitar(at)gmail(dot)com>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Cc: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Determining if a table really changed in a trigger
Date: 2021-10-27 14:06:38
Message-ID: CAKLmikOm34j2ZyDEbz63ZZ81NXqoma_tbsBqGHO9XReR7-R0+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

On Wed, Oct 27, 2021 at 12:56 PM Marcos Pegoraro <marcos(at)f10(dot)com(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tore Halvorsen 2021-10-27 14:08:05 Re: pg_dump and pg_restore and foreign keys
Previous Message Tom Lane 2021-10-27 14:04:26 Re: pg_dump and pg_restore and foreign keys