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 CAKLmikPDTCZPuY=3bgtkZgXbVy8bfyrA_OYM0dNp4Pu2Viat-A@mail.gmail.com
Whole thread Raw
In response to Re: Determining if a table really changed in a trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi!

On Sat, Nov 6, 2021 at 2:43 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mitar <mmitar@gmail.com> writes:
> > Anyone? Any way to determine the number of affected rows in a statement trigger?
>
> Check the size of the transition relation.

Yes, this is what we are currently doing, but it looks very
inefficient if you want just the number, no? Or even if you want to
know if it is non-zero or zero.


Mitar

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



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Determining if a table really changed in a trigger
Next
From: Erik Wienhold
Date:
Subject: Design database schemas around a common subset of objects