Skip to content

Commit f8c0af8

Browse files
committed
Minor copy-editing in CREATE TRIGGER reference page.
Per suggestions from Thom Brown and Robert Haas.
1 parent 1a4ab9e commit f8c0af8

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

doc/src/sgml/ref/create_trigger.sgml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable>
2828
[ FOR [ EACH ] { ROW | STATEMENT } ]
2929
[ WHEN ( <replaceable class="parameter">condition</replaceable> ) ]
3030
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
3138
</synopsis>
3239
</refsynopsisdiv>
3340

@@ -212,24 +219,24 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable>
212219
<term><replaceable class="parameter">event</replaceable></term>
213220
<listitem>
214221
<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>;
217224
this specifies the event that will fire the trigger. Multiple
218225
events can be specified using <literal>OR</literal>.
219226
</para>
220227

221228
<para>
222-
For <command>UPDATE</command> triggers, it is possible to
229+
For <literal>UPDATE</literal> events, it is possible to
223230
specify a list of columns using this syntax:
224231
<synopsis>
225232
UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</replaceable> ... ]
226233
</synopsis>
227234
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.
229236
</para>
230237

231238
<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.
233240
</para>
234241
</listitem>
235242
</varlistentry>
@@ -365,8 +372,8 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
365372
</para>
366373

367374
<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
370377
of its columns are listed as targets in the <command>UPDATE</>
371378
command's <literal>SET</> list. It is possible for a column's value
372379
to change even when the trigger is not fired, because changes made to the

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy