Skip to content

Commit f5a4932

Browse files
author
Etsuro Fujita
committed
Doc: clarify the restrictions of AFTER triggers with transition tables.
It was not very clear that the triggers are only allowed on plain tables (not foreign tables). Also, rephrase the documentation for better readability. Follow up to commit 9e6104c. Reported-by: Etsuro Fujita <etsuro.fujita@gmail.com> Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Reviewed-by: Etsuro Fujita <etsuro.fujita@gmail.com> Discussion: https://postgr.es/m/CAPmGK16XBs9ptNr8Lk4f-tJZogf6y-Prz%3D8yhvJbb_4dpsc3mQ%40mail.gmail.com Backpatch-through: 13
1 parent 04bc2c4 commit f5a4932

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/src/sgml/ref/create_trigger.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,11 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable>
187187
of the rows inserted, deleted, or modified by the current SQL statement.
188188
This feature lets the trigger see a global view of what the statement did,
189189
not just one row at a time. This option is only allowed for
190-
an <literal>AFTER</literal> trigger that is not a constraint trigger; also, if
191-
the trigger is an <literal>UPDATE</literal> trigger, it must not specify
192-
a <replaceable class="parameter">column_name</replaceable> list.
190+
an <literal>AFTER</literal> trigger on a plain table (not a foreign table).
191+
The trigger should not be a constraint trigger. Also, if the trigger is
192+
an <literal>UPDATE</literal> trigger, it must not specify
193+
a <replaceable class="parameter">column_name</replaceable> list when using
194+
this option.
193195
<literal>OLD TABLE</literal> may only be specified once, and only for a trigger
194196
that can fire on <literal>UPDATE</literal> or <literal>DELETE</literal>; it creates a
195197
transition relation containing the <firstterm>before-images</firstterm> of all rows

0 commit comments

Comments
 (0)