Skip to content

Commit 5a900d6

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 11de339 commit 5a900d6

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
@@ -197,9 +197,11 @@ CREATE [ OR REPLACE ] [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name
197197
of the rows inserted, deleted, or modified by the current SQL statement.
198198
This feature lets the trigger see a global view of what the statement did,
199199
not just one row at a time. This option is only allowed for
200-
an <literal>AFTER</literal> trigger that is not a constraint trigger; also, if
201-
the trigger is an <literal>UPDATE</literal> trigger, it must not specify
202-
a <replaceable class="parameter">column_name</replaceable> list.
200+
an <literal>AFTER</literal> trigger on a plain table (not a foreign table).
201+
The trigger should not be a constraint trigger. Also, if the trigger is
202+
an <literal>UPDATE</literal> trigger, it must not specify
203+
a <replaceable class="parameter">column_name</replaceable> list when using
204+
this option.
203205
<literal>OLD TABLE</literal> may only be specified once, and only for a trigger
204206
that can fire on <literal>UPDATE</literal> or <literal>DELETE</literal>; it creates a
205207
transition relation containing the <firstterm>before-images</firstterm> of all rows

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy