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

From Mark Dilger
Subject Re: Determining if a table really changed in a trigger
Date
Msg-id E836C919-AD39-47DA-BEA3-8B6D0C9F34A8@enterprisedb.com
Whole thread Raw
In response to Re: Determining if a table really changed in a trigger  (Michael Lewis <mlewis@entrata.com>)
Responses Re: Determining if a table really changed in a trigger
List pgsql-general

> On Oct 26, 2021, at 4:01 PM, Michael Lewis <mlewis@entrata.com> wrote:
>
> Does this perform differently from suppress_redundant_updates_trigger?
>
> https://www.postgresql.org/docs/current/functions-trigger.html

If Mitar finds that suppress_redundant_updates_trigger is sufficient, that may be a simpler solution.  Thanks for
mentioningit. 

The suppress_redundant_updates_trigger uses memcmp on the old and new rows.  I don't know if memcmp will be sufficient
inthis case, since json can be binary unequal and yet turn out to be equal once cast to jsonb.  I was using the rule
andcasting the json column to jsonb before comparing for equality. 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Determining if a table really changed in a trigger
Next
From: Michael Lewis
Date:
Subject: Re: How to copy rows into same table efficiently