Docs: minor improvements for documentation about plpgsql triggers.
authorTom Lane
Fri, 8 Jul 2016 17:23:09 +0000 (13:23 -0400)
committerTom Lane
Fri, 8 Jul 2016 17:23:09 +0000 (13:23 -0400)
Fabien Coelho, some further wordsmithing by me

doc/src/sgml/plpgsql.sgml

index 7f23c2f9bcfc69ff5d458e1a3318211b6cd10846..e9cce8240855fc4bf0fa33179cbd8e6683aaab5e 100644 (file)
@@ -3660,18 +3660,27 @@ ASSERT condition  , 
    in PL/pgSQL
   
 
+  
+   PL/pgSQL can be used to define trigger
+   procedures on data changes or database events.
+   A trigger procedure is created with the CREATE FUNCTION
+   command, declaring it as a function with no arguments and a return type of
+   trigger (for data change triggers) or
+   event_trigger (for database event triggers).
+   Special local variables named PG_something are
+   automatically defined to describe the condition that triggered the call.
+  
+
   
    Triggers on Data Changes
 
-   
-    PL/pgSQL can be used to define trigger
-    procedures. A trigger procedure is created with the
-    CREATE FUNCTION command, declaring it as a function with
-    no arguments and a return type of trigger.  Note that
-    the function must be declared with no arguments even if it expects
-    to receive arguments specified in CREATE TRIGGER —
-    trigger arguments are passed via TG_ARGV, as described
-    below.
+  
+   A data change trigger is declared as a
+   function with no arguments and a return type of trigger.
+   Note that the function must be declared with no arguments even if it
+   expects to receive some arguments specified in CREATE TRIGGER
+   — such arguments are passed via TG_ARGV, as described
+   below.
   
 
   
@@ -4218,8 +4227,9 @@ SELECT * FROM sales_summary_bytime;
    Triggers on Events
 
    
-    PL/pgSQL can be used to define event
-    triggers.  PostgreSQL requires that a procedure that
+    PL/pgSQL can be used to define
+    event triggers.
+    PostgreSQL requires that a procedure that
     is to be called as an event trigger must be declared as a function with
     no arguments and a return type of event_trigger.