Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
04ef4040
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,发现更多精彩内容 >>
提交
04ef4040
编写于
1月 18, 2010
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update SET CONSTRAINTS reference page --- it failed to mention EXCLUDE
constraints and was lacking a couple of other interesting details.
上级
9a915e59
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
10 deletion
+25
-10
doc/src/sgml/ref/set_constraints.sgml
doc/src/sgml/ref/set_constraints.sgml
+25
-10
未找到文件。
doc/src/sgml/ref/set_constraints.sgml
浏览文件 @
04ef4040
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.1
7 2009/07/29 20:56:17
tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.1
8 2010/01/18 00:32:21
tgl Exp $ -->
<refentry id="SQL-SET-CONSTRAINTS">
<refmeta>
<refentrytitle id="SQL-SET-CONSTRAINTS-title">SET CONSTRAINTS</refentrytitle>
...
...
@@ -8,7 +8,7 @@
<refnamediv>
<refname>SET CONSTRAINTS</refname>
<refpurpose>set constraint check
ing modes
for the current transaction</refpurpose>
<refpurpose>set constraint check
timing
for the current transaction</refpurpose>
</refnamediv>
<indexterm zone="sql-set-constraints">
...
...
@@ -46,7 +46,8 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">name</replaceable> [, ...
<para>
<command>SET CONSTRAINTS</command> with a list of constraint names changes
the mode of just those constraints (which must all be deferrable). The
the mode of just those constraints (which must all be deferrable). Each
constraint name can be schema-qualified. The
current schema search path is used to find the first matching name if
no schema name is specified. <command>SET CONSTRAINTS ALL</command>
changes the mode of all deferrable constraints.
...
...
@@ -66,13 +67,14 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">name</replaceable> [, ...
</para>
<para>
Currently, only <literal>UNIQUE</>, <literal>PRIMARY KEY</>, and
<literal>REFERENCES</> (foreign key) constraints are affected by this
setting. <literal>NOT NULL</> and <literal>CHECK</> constraints are
Currently, only <literal>UNIQUE</>, <literal>PRIMARY KEY</>,
<literal>REFERENCES</> (foreign key), and <literal>EXCLUDE</>
constraints are affected by this setting.
<literal>NOT NULL</> and <literal>CHECK</> constraints are
always checked immediately when a row is inserted or modified
(<emphasis>not</> at the end of the statement).
Uniqueness
constraints that have not been declared <literal>DEFERRABLE</>
are also checked immediately.
Uniqueness
and exclusion constraints that have not been declared
<literal>DEFERRABLE</>
are also checked immediately.
</para>
<para>
...
...
@@ -85,6 +87,16 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">name</replaceable> [, ...
<refsect1>
<title>Notes</title>
<para>
Because <productname>PostgreSQL</productname> does not require constraint
names to be unique within a schema (but only per-table), it is possible
that there is more than one match for a specified constraint name.
In this case <command>SET CONSTRAINTS</command> will act on all matches.
For a non-schema-qualified name, once a match or matches have been found in
some schema in the search path, schemas appearing later in the path are not
searched.
</para>
<para>
This command only alters the behavior of constraints within the
current transaction. Thus, if you execute this command outside of a
...
...
@@ -100,8 +112,11 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">name</replaceable> [, ...
<para>
This command complies with the behavior defined in the SQL
standard, except for the limitation that, in
<productname>PostgreSQL</productname>, it only applies to
foreign-key and uniqueness constraints.
<productname>PostgreSQL</productname>, it does not apply to
<literal>NOT NULL</> and <literal>CHECK</> constraints.
Also, <productname>PostgreSQL</productname> checks non-deferrable
uniqueness constraints immediately, not at end of statement as the
standard would suggest.
</para>
</refsect1>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录