From: Christoph Berg Date: Wed, 31 Aug 2022 11:52:50 +0200 Subject: [PATCH] plpgsql-trigger.html: Use more concise wording for TG_ variables To improve readability of the TG_ variables definition list, this moves the datatypes up to the defined term to avoid having each entry start with "Data type", and removes some more redundant clutter ("Variable holding...") from the descriptions that didn't carry any information. --- doc/src/sgml/plpgsql.sgml | 52 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index cf387dfc3f..b5cfe3c63d 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -4032,10 +4032,10 @@ ASSERT condition , - NEW + NEW (record) - Data type RECORD; variable holding the new + new database row for INSERT/UPDATE operations in row-level triggers. This variable is null in statement-level triggers and for DELETE operations. @@ -4044,10 +4044,10 @@ ASSERT condition , - OLD + OLD (record) - Data type RECORD; variable holding the old + 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 +4056,20 @@ ASSERT condition , - TG_NAME + TG_NAME (name) - Data type name; variable that contains the name of the trigger actually + name of the trigger actually fired. - TG_WHEN + TG_WHEN (text) - Data type text; a string of + contains BEFORE, AFTER, or INSTEAD OF, depending on the trigger's definition. @@ -4077,43 +4077,43 @@ ASSERT condition , - TG_LEVEL + TG_LEVEL (text) - Data type text; a string of either - ROW or STATEMENT + contains + ROW or STATEMENT, depending on the trigger's definition. - TG_OP + TG_OP (text) - Data type text; a string of + contains INSERT, UPDATE, - DELETE, or TRUNCATE + DELETE, or TRUNCATE, telling for which operation the trigger was fired. - TG_RELID + TG_RELID (oid, references pg_class.oid) - Data type oid; the object ID of the table that caused the + 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 + name of the table that caused the trigger invocation. This is now deprecated, and could disappear in a future release. Use TG_TABLE_NAME instead. @@ -4121,40 +4121,40 @@ ASSERT condition , - TG_TABLE_NAME + TG_TABLE_NAME (name) - Data type name; the name of the table that + name of the table that caused the trigger invocation. - TG_TABLE_SCHEMA + TG_TABLE_SCHEMA (name) - Data type name; the name of the schema of the + name of the 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[] + TG_ARGV (text[]) - 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) -- 2.35.1 --8V5MhyfwqH+QQCr/--