@@ -4032,129 +4032,120 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl
4032
4032
4033
4033
<variablelist>
4034
4034
<varlistentry>
4035
- <term><varname>NEW</varname></term>
4035
+ <term><varname>NEW</varname> <type>record</type> </term>
4036
4036
<listitem>
4037
4037
<para>
4038
- Data type <type>RECORD</type>; variable holding the new
4039
- database row for <command>INSERT</command>/<command>UPDATE</command> operations in row-level
4038
+ new database row for <command>INSERT</command>/<command>UPDATE</command> operations in row-level
4040
4039
triggers. This variable is null in statement-level triggers
4041
4040
and for <command>DELETE</command> operations.
4042
4041
</para>
4043
4042
</listitem>
4044
4043
</varlistentry>
4045
4044
4046
4045
<varlistentry>
4047
- <term><varname>OLD</varname></term>
4046
+ <term><varname>OLD</varname> <type>record</type> </term>
4048
4047
<listitem>
4049
4048
<para>
4050
- Data type <type>RECORD</type>; variable holding the old
4051
- database row for <command>UPDATE</command>/<command>DELETE</command> operations in row-level
4049
+ old database row for <command>UPDATE</command>/<command>DELETE</command> operations in row-level
4052
4050
triggers. This variable is null in statement-level triggers
4053
4051
and for <command>INSERT</command> operations.
4054
4052
</para>
4055
4053
</listitem>
4056
4054
</varlistentry>
4057
4055
4058
4056
<varlistentry>
4059
- <term><varname>TG_NAME</varname></term>
4057
+ <term><varname>TG_NAME</varname> <type>name</type> </term>
4060
4058
<listitem>
4061
4059
<para>
4062
- Data type <type>name</type>; variable that contains the name of the trigger actually
4063
- fired.
4060
+ name of the trigger which fired.
4064
4061
</para>
4065
4062
</listitem>
4066
4063
</varlistentry>
4067
4064
4068
4065
<varlistentry>
4069
- <term><varname>TG_WHEN</varname></term>
4066
+ <term><varname>TG_WHEN</varname> <type>text</type> </term>
4070
4067
<listitem>
4071
4068
<para>
4072
- Data type <type>text</type>; a string of
4073
4069
<literal>BEFORE</literal>, <literal>AFTER</literal>, or
4074
4070
<literal>INSTEAD OF</literal>, depending on the trigger's definition.
4075
4071
</para>
4076
4072
</listitem>
4077
4073
</varlistentry>
4078
4074
4079
4075
<varlistentry>
4080
- <term><varname>TG_LEVEL</varname></term>
4076
+ <term><varname>TG_LEVEL</varname> <type>text</type> </term>
4081
4077
<listitem>
4082
4078
<para>
4083
- Data type <type>text</type>; a string of either
4084
- <literal>ROW</literal> or <literal>STATEMENT</literal>
4079
+ <literal>ROW</literal> or <literal>STATEMENT</literal>,
4085
4080
depending on the trigger's definition.
4086
4081
</para>
4087
4082
</listitem>
4088
4083
</varlistentry>
4089
4084
4090
4085
<varlistentry>
4091
- <term><varname>TG_OP</varname></term>
4086
+ <term><varname>TG_OP</varname> <type>text</type> </term>
4092
4087
<listitem>
4093
4088
<para>
4094
- Data type <type>text</type>; a string of
4089
+ operation for which the trigger was fired:
4095
4090
<literal>INSERT</literal>, <literal>UPDATE</literal>,
4096
- <literal>DELETE</literal>, or <literal>TRUNCATE</literal>
4097
- telling for which operation the trigger was fired.
4091
+ <literal>DELETE</literal>, or <literal>TRUNCATE</literal>.
4098
4092
</para>
4099
4093
</listitem>
4100
4094
</varlistentry>
4101
4095
4102
4096
<varlistentry>
4103
- <term><varname>TG_RELID</varname></term>
4097
+ <term><varname>TG_RELID</varname> <type>oid</type> (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>) </term>
4104
4098
<listitem>
4105
4099
<para>
4106
- Data type <type>oid</type>; the object ID of the table that caused the
4107
- trigger invocation.
4100
+ object ID of the table that caused the trigger invocation.
4108
4101
</para>
4109
4102
</listitem>
4110
4103
</varlistentry>
4111
4104
4112
4105
<varlistentry>
4113
- <term><varname>TG_RELNAME</varname></term>
4106
+ <term><varname>TG_RELNAME</varname> <type>name</type> </term>
4114
4107
<listitem>
4115
4108
<para>
4116
- Data type <type>name</type>; the name of the table that caused the trigger
4109
+ table that caused the trigger
4117
4110
invocation. This is now deprecated, and could disappear in a future
4118
4111
release. Use <literal>TG_TABLE_NAME</literal> instead.
4119
4112
</para>
4120
4113
</listitem>
4121
4114
</varlistentry>
4122
4115
4123
4116
<varlistentry>
4124
- <term><varname>TG_TABLE_NAME</varname></term>
4117
+ <term><varname>TG_TABLE_NAME</varname> <type>name</type> </term>
4125
4118
<listitem>
4126
4119
<para>
4127
- Data type <type>name</type>; the name of the table that
4128
- caused the trigger invocation.
4120
+ table that caused the trigger invocation.
4129
4121
</para>
4130
4122
</listitem>
4131
4123
</varlistentry>
4132
4124
4133
4125
<varlistentry>
4134
- <term><varname>TG_TABLE_SCHEMA</varname></term>
4126
+ <term><varname>TG_TABLE_SCHEMA</varname> <type>name</type> </term>
4135
4127
<listitem>
4136
4128
<para>
4137
- Data type <type>name</type>; the name of the schema of the
4138
- table that caused the trigger invocation.
4129
+ schema of the table that caused the trigger invocation.
4139
4130
</para>
4140
4131
</listitem>
4141
4132
</varlistentry>
4142
4133
4143
4134
<varlistentry>
4144
- <term><varname>TG_NARGS</varname></term>
4135
+ <term><varname>TG_NARGS</varname> <type>integer</type> </term>
4145
4136
<listitem>
4146
4137
<para>
4147
- Data type <type>integer</type>; the number of arguments given to the trigger
4138
+ number of arguments given to the trigger
4148
4139
function in the <command>CREATE TRIGGER</command> statement.
4149
4140
</para>
4150
4141
</listitem>
4151
4142
</varlistentry>
4152
4143
4153
4144
<varlistentry>
4154
- <term><varname>TG_ARGV[]</varname ></term>
4145
+ <term><varname>TG_ARGV</varname> <type>text []</type ></term>
4155
4146
<listitem>
4156
4147
<para>
4157
- Data type array of <type>text</type>; the arguments from
4148
+ arguments from
4158
4149
the <command>CREATE TRIGGER</command> statement.
4159
4150
The index counts from 0. Invalid
4160
4151
indexes (less than 0 or greater than or equal to <varname>tg_nargs</varname>)
@@ -4656,21 +4647,19 @@ CREATE TRIGGER emp_audit_del
4656
4647
4657
4648
<variablelist>
4658
4649
<varlistentry>
4659
- <term><varname>TG_EVENT</varname></term>
4650
+ <term><varname>TG_EVENT</varname> <type>text</type> </term>
4660
4651
<listitem>
4661
4652
<para>
4662
- Data type <type>text</type>; a string representing the event the
4663
- trigger is fired for.
4653
+ event the trigger is fired for.
4664
4654
</para>
4665
4655
</listitem>
4666
4656
</varlistentry>
4667
4657
4668
4658
<varlistentry>
4669
- <term><varname>TG_TAG</varname></term>
4659
+ <term><varname>TG_TAG</varname> <type>text</type> </term>
4670
4660
<listitem>
4671
4661
<para>
4672
- Data type <type>text</type>; variable that contains the command tag
4673
- for which the trigger is fired.
4662
+ command tag for which the trigger is fired.
4674
4663
</para>
4675
4664
</listitem>
4676
4665
</varlistentry>
0 commit comments