@@ -28,6 +28,13 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable>
28
28
[ FOR [ EACH ] { ROW | STATEMENT } ]
29
29
[ WHEN ( <replaceable class="parameter">condition</replaceable> ) ]
30
30
EXECUTE PROCEDURE <replaceable class="PARAMETER">function_name</replaceable> ( <replaceable class="PARAMETER">arguments</replaceable> )
31
+
32
+ <phrase>where <replaceable class="parameter">event</replaceable> can be one of:</phrase>
33
+
34
+ INSERT
35
+ UPDATE [ OF <replaceable class="parameter">column_name</replaceable> [, ... ] ]
36
+ DELETE
37
+ TRUNCATE
31
38
</synopsis>
32
39
</refsynopsisdiv>
33
40
@@ -212,24 +219,24 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable>
212
219
<term><replaceable class="parameter">event</replaceable></term>
213
220
<listitem>
214
221
<para>
215
- One of <command >INSERT</command >, <command >UPDATE</command >,
216
- <command >DELETE</command >, or <command >TRUNCATE</command >;
222
+ One of <literal >INSERT</literal >, <literal >UPDATE</literal >,
223
+ <literal >DELETE</literal >, or <literal >TRUNCATE</literal >;
217
224
this specifies the event that will fire the trigger. Multiple
218
225
events can be specified using <literal>OR</literal>.
219
226
</para>
220
227
221
228
<para>
222
- For <command >UPDATE</command> triggers , it is possible to
229
+ For <literal >UPDATE</literal> events , it is possible to
223
230
specify a list of columns using this syntax:
224
231
<synopsis>
225
232
UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</replaceable> ... ]
226
233
</synopsis>
227
234
The trigger will only fire if at least one of the listed columns
228
- is mentioned as a target of the update .
235
+ is mentioned as a target of the <command>UPDATE</> command .
229
236
</para>
230
237
231
238
<para>
232
- <literal>UPDATE INSTEAD OF</> triggers do not support lists of columns.
239
+ <literal>INSTEAD OF UPDATE </> events do not support lists of columns.
233
240
</para>
234
241
</listitem>
235
242
</varlistentry>
@@ -365,8 +372,8 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
365
372
</para>
366
373
367
374
<para>
368
- A column-specific trigger (<literal>FOR UPDATE OF
369
- <replaceable>column_name</replaceable></literal>) will fire when any
375
+ A column-specific trigger (one defined using the <literal>UPDATE OF
376
+ <replaceable>column_name</replaceable></literal> syntax ) will fire when any
370
377
of its columns are listed as targets in the <command>UPDATE</>
371
378
command's <literal>SET</> list. It is possible for a column's value
372
379
to change even when the trigger is not fired, because changes made to the
0 commit comments