Re: Determining if a table really changed in a trigger

From: Mitar <mmitar(at)gmail(dot)com>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Determining if a table really changed in a trigger
Date: 2021-11-06 07:13:50
Message-ID: CAKLmikMdcr_hLSJNVy-i+WNiBFftawtV+o4-03=yn0w74fOfEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

On Wed, Oct 27, 2021 at 12:46 AM Mark Dilger
<mark(dot)dilger(at)enterprisedb(dot)com> wrote:
> I felt the same way about it, but after glancing quickly through the code and docs nothing jumped out. The information is clearly available, as it gets returned at the end of the UPDATE statement in the "UPDATE 0" OR "UPDATE 3", but I don't see how to access that from the trigger. I might have to submit a patch for that if nobody else knows a way to get it. (Hopefully somebody will respond with the answer...?)

Anyone? Any way to determine the number of affected rows in a statement trigger?

Mitar

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2021-11-06 11:51:21 Re: Question: Is it possible to get the new xlog position after query execution?
Previous Message Boboc Cristi 2021-11-05 17:07:44 Re: Debugging features needed