public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Bruce Momjian <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Andrew Gierth <[email protected]>
Subject: Re: Trigger behaviour not as stated
Date: Sun, 28 Jan 2018 15:57:07 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<CAEepm=1cAO8y4dFv_xd=43iP7f4T3A2hYAzjgjQagHtt7H87Fw@mail.gmail.com>
<[email protected]>
<[email protected]>
Bruce Momjian <[email protected]> writes:
> Uh, I don't think we want to highlight the statement vs row difference
> here but the fact that statement triggers fire on the referenced object
> and not on the effected rows. I have attached an updated patch which I
> think is an improvement
statement-level triggers for its partitions or child tables. In contrast,
! row-level triggers are fired on the rows in effected partitions or
! child tables, even if they are not referenced in the query.
I still think that that's not well written. A large part of the confusion
here is over what "referenced" means. To my mind, child tables/partitions
are referenced by an inherited query, just not explicitly. So that's why
I'd prefer wording like "directly named in the query" (or "explicitly
named"). If you insist on using "referenced" you could write "explicitly
referenced", but IMO that's longer and no clearer.
A lesser complaint is that this reads like the antecedent of "they" is the
rows, not the tables containing them, making the meaning of "referenced"
even less clear.
Maybe something like
In contrast, row-level triggers are fired for individual row change
events, and the triggers that are fired for an event are those
attached to the specific table containing the changed row, even if
it is a partition or child table not directly named in the query.
regards, tom lane
view thread (13+ messages) latest in thread
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], [email protected], [email protected]
Subject: Re: Trigger behaviour not as stated
In-Reply-To: <[email protected]>
* 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