summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-03-07 16:00:36 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-03-07 16:00:36 -0500
commitf8c0af840d84086249647d4415bd35903bfc7933 (patch)
tree81d8a5aa25b0c2798d8d83501566d775fed1343d /doc/src
parent1a4ab9ec23f0635a4c15b069df60b545814650e9 (diff)
Minor copy-editing in CREATE TRIGGER reference page.
Per suggestions from Thom Brown and Robert Haas.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/create_trigger.sgml21
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml
index e697ab6cc93..8e502d94e48 100644
--- a/doc/src/sgml/ref/create_trigger.sgml
+++ b/doc/src/sgml/ref/create_trigger.sgml
@@ -28,6 +28,13 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable>
[ FOR [ EACH ] { ROW | STATEMENT } ]
[ WHEN ( <replaceable class="parameter">condition</replaceable> ) ]
EXECUTE PROCEDURE <replaceable class="PARAMETER">function_name</replaceable> ( <replaceable class="PARAMETER">arguments</replaceable> )
+
+<phrase>where <replaceable class="parameter">event</replaceable> can be one of:</phrase>
+
+ INSERT
+ UPDATE [ OF <replaceable class="parameter">column_name</replaceable> [, ... ] ]
+ DELETE
+ TRUNCATE
</synopsis>
</refsynopsisdiv>
@@ -212,24 +219,24 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable>
<term><replaceable class="parameter">event</replaceable></term>
<listitem>
<para>
- One of <command>INSERT</command>, <command>UPDATE</command>,
- <command>DELETE</command>, or <command>TRUNCATE</command>;
+ One of <literal>INSERT</literal>, <literal>UPDATE</literal>,
+ <literal>DELETE</literal>, or <literal>TRUNCATE</literal>;
this specifies the event that will fire the trigger. Multiple
events can be specified using <literal>OR</literal>.
</para>
<para>
- For <command>UPDATE</command> triggers, it is possible to
+ For <literal>UPDATE</literal> events, it is possible to
specify a list of columns using this syntax:
<synopsis>
UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</replaceable> ... ]
</synopsis>
The trigger will only fire if at least one of the listed columns
- is mentioned as a target of the update.
+ is mentioned as a target of the <command>UPDATE</> command.
</para>
<para>
- <literal>UPDATE INSTEAD OF</> triggers do not support lists of columns.
+ <literal>INSTEAD OF UPDATE</> events do not support lists of columns.
</para>
</listitem>
</varlistentry>
@@ -365,8 +372,8 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
</para>
<para>
- A column-specific trigger (<literal>FOR UPDATE OF
- <replaceable>column_name</replaceable></literal>) will fire when any
+ A column-specific trigger (one defined using the <literal>UPDATE OF
+ <replaceable>column_name</replaceable></literal> syntax) will fire when any
of its columns are listed as targets in the <command>UPDATE</>
command's <literal>SET</> list. It is possible for a column's value
to change even when the trigger is not fired, because changes made to the