Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
f8c0af84
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f8c0af84
编写于
3月 07, 2011
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor copy-editing in CREATE TRIGGER reference page.
Per suggestions from Thom Brown and Robert Haas.
上级
1a4ab9ec
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
7 deletion
+14
-7
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/create_trigger.sgml
+14
-7
未找到文件。
doc/src/sgml/ref/create_trigger.sgml
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录