public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Josh Silver <[email protected]>
Cc: Pg Docs <[email protected]>
Subject: Re: Clarification of triggers with 'OF column_name' in 'Overview of Trigger Behavior'
Date: Mon, 2 May 2022 18:55:09 -0700
Message-ID: <CAKFQuwZg7rh9UsyLEn7+=fc-fvT2f4MDtbFehvCvrGte+YUTpQ@mail.gmail.com> (raw)
In-Reply-To: <CADRdQa0ow74BwKDcpU-MCYcRJfQER5mZ+phL4iJWABRHgkXraw@mail.gmail.com>
References: <[email protected]>
	<CAKFQuwY=c7t3PpihnsrcQPOGoKGyWFuvA5x9bwSSBZSJTz_tgQ@mail.gmail.com>
	<CADRdQa27rS+GpdYu_sV9Bjdu9vVtCthdFSv7ABZt0M9xHiPSMA@mail.gmail.com>
	<CAKFQuwYYS_yKFFgcZe18UBc6VPVJuVmLbTR20Vb0xCL+N5MCKw@mail.gmail.com>
	<CADRdQa0ow74BwKDcpU-MCYcRJfQER5mZ+phL4iJWABRHgkXraw@mail.gmail.com>

On Mon, May 2, 2022 at 6:33 PM Josh Silver <[email protected]> wrote:

>
> and the  'Overview of Trigger Behavior pages says of before triggers
>
>> In row-level triggers the WHEN condition can examine the old and/or new
>> values of columns of the row. (Statement-level triggers can also have
>> WHEN conditions, although the feature is not so useful for them.) In a
>> BEFORE trigger, the WHEN condition is evaluated just before the function
>> is or would be executed, so using WHEN is not materially different from
>> testing the same condition at the beginning of the trigger function.
>
>
> but does not even mention column specific triggers by name.
>
>
The previous paragraph reads in part:

"If more than one trigger is defined for the same event on the same
relation, the triggers will be fired in alphabetical order by trigger name."

I'll say that we don't provide a granular definition of what an "event" is
here - namely the "INSERT/UPDATE/DELETE/SELECT + any column limitation".

So, it is covered if you understand the column aspect is rolled into
"trigger event".

David J.


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Clarification of triggers with 'OF column_name' in 'Overview of Trigger Behavior'
  In-Reply-To: <CAKFQuwZg7rh9UsyLEn7+=fc-fvT2f4MDtbFehvCvrGte+YUTpQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox