summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-09-17 12:16:38 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-09-17 12:16:38 -0400
commitfd31f9f033213e2ebf00b57ef837e1828c338fc4 (patch)
tree945081f4a4faa57f17a648ef68a51d2f4fbb7917 /doc/src
parentcad22075bc2ce9c1fbe61e8d3969d4dbdb5bc1f3 (diff)
Ensure that BEFORE STATEMENT triggers fire the right number of times.
Commit 0f79440fb introduced mechanism to keep AFTER STATEMENT triggers from firing more than once per statement, which was formerly possible if more than one FK enforcement action had to be applied to a given table. Add a similar mechanism for BEFORE STATEMENT triggers, so that we don't have the unexpected situation of firing BEFORE STATEMENT triggers more often than AFTER STATEMENT. As with the previous patch, back-patch to v10. Discussion: https://postgr.es/m/22315.1505584992@sss.pgh.pa.us
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/create_trigger.sgml14
1 files changed, 9 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml
index 065c8272710..2496250bed8 100644
--- a/doc/src/sgml/ref/create_trigger.sgml
+++ b/doc/src/sgml/ref/create_trigger.sgml
@@ -250,7 +250,8 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable>
One of <literal>INSERT</literal>, <literal>UPDATE</literal>,
<literal>DELETE</literal>, or <literal>TRUNCATE</literal>;
this specifies the event that will fire the trigger. Multiple
- events can be specified using <literal>OR</literal>.
+ events can be specified using <literal>OR</literal>, except when
+ transition relations are requested.
</para>
<para>
@@ -263,7 +264,10 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
is mentioned as a target of the <command>UPDATE</> command.
</para>
- <para><literal>INSTEAD OF UPDATE</> events do not support lists of columns.
+ <para>
+ <literal>INSTEAD OF UPDATE</> events do not allow a list of columns.
+ A column list cannot be specified when requesting transition relations,
+ either.
</para>
</listitem>
</varlistentry>
@@ -490,9 +494,9 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
trigger that requests transition relations will cause the foreign-key
enforcement actions triggered by a single SQL command to be split into
multiple steps, each with its own transition relation(s). In such cases,
- any <literal>AFTER STATEMENT</> triggers that are present will be fired
- once per creation of a transition relation, ensuring that the triggers see
- each affected row once and only once.
+ any statement-level triggers that are present will be fired once per
+ creation of a transition relation set, ensuring that the triggers see
+ each affected row in a transition relation once and only once.
</para>
<para>