Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Doc: improve description of which role runs a trigger. master github/master
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 Jun 2025 19:24:15 +0000 (15:24 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 Jun 2025 19:24:15 +0000 (15:24 -0400)
Refine wording from commit 01463e1cc.

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

doc/src/sgml/trigger.sgml

index e9214dcf1b1bd1a9de79bfa310e2de9b2f30193f..bb1b5faf34e317be926ac294e32b73e873c8b86c 100644 (file)
     In all cases, a trigger is executed as part of the same transaction as
     the statement that triggered it, so if either the statement or the
     trigger causes an error, the effects of both will be rolled back.
-    Also, the trigger will always run in the security context of the role
-    that executed the statement that caused the trigger to fire, unless
-    the trigger function is defined as <literal>SECURITY DEFINER</literal>,
-    in which case it will run as the function owner.
+    Also, the trigger will always run as the role that queued the trigger
+    event, unless the trigger function is marked as <literal>SECURITY
+    DEFINER</literal>, in which case it will run as the function owner.
    </para>
 
    <para>