Re: Determining if a table really changed in a trigger

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Mitar <mmitar(at)gmail(dot)com>
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 01:56:39
Message-ID: CAHOFxGpCuubDP48nD-+Gfj7NCbHvvjBGJ4qeOFT7QYmdhEvoNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If you end up with no rows changing from an insert or delete, something
seems awry. Unless you mean 0 rows affected. Do after statement triggers
still execute? I suppose they very well might.

Would the statement even execute if no rows get updated and that is
prevented with before update? I would assume null is being returned rather
than old if the trigger finds the row to be identical.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2021-10-27 04:02:21 Re: Need help understanding error message [RESOLVED]
Previous Message Benedict Holland 2021-10-27 01:26:38 Re: ZFS filesystem - supported ?