Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f8c0af84
Commit
f8c0af84
authored
Mar 07, 2011
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor copy-editing in CREATE TRIGGER reference page.
Per suggestions from Thom Brown and Robert Haas.
parent
1a4ab9ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/create_trigger.sgml
+14
-7
No files found.
doc/src/sgml/ref/create_trigger.sgml
View file @
f8c0af84
...
...
@@ -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> trigger
s, it is possible to
For <
literal>UPDATE</literal> event
s, 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</> trigger
s do not support lists of columns.
<literal>
INSTEAD OF UPDATE</> event
s 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment