Skip to content

Commit c37be39

Browse files
committed
Doc: improve description of which role runs a trigger.
Refine wording from commit 01463e1. Author: Noah Misch <noah@leadboat.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20250605163441.2f.nmisch@google.com
1 parent 54c6ea8 commit c37be39

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/src/sgml/trigger.sgml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,9 @@
129129
In all cases, a trigger is executed as part of the same transaction as
130130
the statement that triggered it, so if either the statement or the
131131
trigger causes an error, the effects of both will be rolled back.
132-
Also, the trigger will always run in the security context of the role
133-
that executed the statement that caused the trigger to fire, unless
134-
the trigger function is defined as <literal>SECURITY DEFINER</literal>,
135-
in which case it will run as the function owner.
132+
Also, the trigger will always run as the role that queued the trigger
133+
event, unless the trigger function is marked as <literal>SECURITY
134+
DEFINER</literal>, in which case it will run as the function owner.
136135
</para>
137136

138137
<para>

0 commit comments

Comments
 (0)