doc: Use more concise wording for pl/pgSQL TG_ variables
authorDaniel Gustafsson
Tue, 15 Nov 2022 13:51:02 +0000 (14:51 +0100)
committerDaniel Gustafsson
Tue, 15 Nov 2022 13:54:49 +0000 (14:54 +0100)
To improve readability of the TG_ variables definition lists, this moves
the datatypes up to the defined term to avoid having each entry start
with "Data type". This also removes redundant wording that that didn't
carry any information from the descriptions.

Author: Christoph Berg 
Reviewed-by: Dagfinn Ilmari Mannsåker
Discussion: https://postgr.es/m/[email protected]

doc/src/sgml/plpgsql.sgml

index d85f89bf303378ab4c0806a3031ed7aec05f41f9..dda667e68e8c909d71363cbab8f49b88fc4b128b 100644 (file)
@@ -4032,11 +4032,10 @@ ASSERT condition  , 
 
    
     
-     NEW
+     NEW record
      
       
-       Data type RECORD; variable holding the new
-       database row for INSERT/UPDATE operations in row-level
+       new database row for INSERT/UPDATE operations in row-level
        triggers. This variable is null in statement-level triggers
        and for DELETE operations.
       
@@ -4044,11 +4043,10 @@ ASSERT condition  , 
     
 
     
-     OLD
+     OLD record
      
       
-       Data type RECORD; variable holding the old
-       database row for UPDATE/DELETE operations in row-level
+       old database row for UPDATE/DELETE operations in row-level
        triggers. This variable is null in statement-level triggers
        and for INSERT operations.
       
@@ -4056,20 +4054,18 @@ ASSERT condition  , 
     
 
     
-     TG_NAME
+     TG_NAME name
      
       
-       Data type name; variable that contains the name of the trigger actually
-       fired.
+       name of the trigger which fired.
       
      
     
 
     
-     TG_WHEN
+     TG_WHEN text
      
       
-       Data type text; a string of
        BEFOREAFTER, or
        INSTEAD OF, depending on the trigger's definition.
       
@@ -4077,43 +4073,40 @@ ASSERT condition  , 
     
 
     
-     TG_LEVEL
+     TG_LEVEL text
      
       
-       Data type text; a string of either
-       ROW or STATEMENT
+       ROW or STATEMENT,
        depending on the trigger's definition.
       
      
     
 
     
-     TG_OP
+     TG_OP text
      
       
-       Data type text; a string of
+       operation for which the trigger was fired:
        INSERTUPDATE,
-       DELETE, or TRUNCATE
-       telling for which operation the trigger was fired.
+       DELETE, or TRUNCATE.
       
      
     
 
     
-     TG_RELID
+     TG_RELID oid (references pg_class.oid)
      
       
-       Data type oid; the object ID of the table that caused the
-       trigger invocation.
+       object ID of the table that caused the trigger invocation.
       
      
     
 
     
-     TG_RELNAME
+     TG_RELNAME name
      
       
-       Data type name; the name of the table that caused the trigger
+       table that caused the trigger
        invocation. This is now deprecated, and could disappear in a future
        release. Use TG_TABLE_NAME instead.
       
@@ -4121,40 +4114,38 @@ ASSERT condition  , 
     
 
     
-     TG_TABLE_NAME
+     TG_TABLE_NAME name
      
       
-       Data type name; the name of the table that
-       caused the trigger invocation.
+       table that caused the trigger invocation.
       
      
     
 
     
-     TG_TABLE_SCHEMA
+     TG_TABLE_SCHEMA name
      
       
-       Data type name; the name of the schema of the
-       table that caused the trigger invocation.
+       schema of the table that caused the trigger invocation.
       
      
     
 
     
-     TG_NARGS
+     TG_NARGS integer
      
       
-       Data type integer; the number of arguments given to the trigger
+       number of arguments given to the trigger
        function in the CREATE TRIGGER statement.
       
      
     
 
     
-     TG_ARGV[]e>
+     TG_ARGV text[]e>
      
       
-       Data type array of text; the arguments from
+       arguments from
        the CREATE TRIGGER statement.
        The index counts from 0. Invalid
        indexes (less than 0 or greater than or equal to tg_nargs)
@@ -4656,21 +4647,19 @@ CREATE TRIGGER emp_audit_del
 
    
     
-     TG_EVENT
+     TG_EVENT text
      
       
-       Data type text; a string representing the event the
-       trigger is fired for.
+       event the trigger is fired for.
       
      
     
 
     
-     TG_TAG
+     TG_TAG text
      
       
-       Data type text; variable that contains the command tag
-       for which the trigger is fired.
+       command tag for which the trigger is fired.