Skip to content

Commit f84aa6b

Browse files
committed
校验 ddl.sgml 校验完成
1 parent 02bca3c commit f84aa6b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

postgresql/doc/src/sgml/ddl.sgml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ ________________________________________________________-->
10601060
________________________________________________________-->
10611061
<para>
10621062
如果您想要的是在插入行时对其他行进行一次性检查,而不是持续维护一致性保证,
1063-
可以使用自定义<link linkend="triggers">触发器</link>来实现。 (这种方法避免了
1063+
可以使用自定义<link linkend="triggers">触发器(trigger)</link>来实现。 (这种方法避免了
10641064
转储/恢复问题,因为<application>pg_dump</application>在恢复数据之后才重新安装触发器,
10651065
因此在转储/恢复期间不会强制执行检查。)
10661066
</para>
@@ -2101,21 +2101,21 @@ ________________________________________________________-->
21012101
通常,外键约束的所有列都会被设置;仅设置子集在某些特殊情况下很有用。考虑以下示例:
21022102
<programlisting>
21032103
CREATE TABLE tenants (
2104-
tenant_id integer 主键
2104+
tenant_id integer PRIMARY KEY
21052105
);
21062106

21072107
CREATE TABLE users (
2108-
tenant_id integer 引用 tenants ON DELETE CASCADE,
2109-
user_id integer 非空,
2110-
主键 (tenant_id, user_id)
2108+
tenant_id integer REFERENCES tenants ON DELETE CASCADE,
2109+
user_id integer NOT NULL,
2110+
PRIMARY KEY (tenant_id, user_id)
21112111
);
21122112

21132113
CREATE TABLE posts (
2114-
tenant_id integer 引用 tenants ON DELETE CASCADE,
2115-
post_id integer 非空,
2114+
tenant_id integer REFERENCES tenants ON DELETE CASCADE,
2115+
post_id integer NOT NULL,
21162116
author_id integer,
2117-
主键 (tenant_id, post_id),
2118-
外键 (tenant_id, author_id) 引用 users ON DELETE SET NULL <emphasis>(author_id)</emphasis>
2117+
PRIMARY KEY (tenant_id, post_id),
2118+
FOREIGN KEY (tenant_id, author_id) REFERENCES users ON DELETE SET NULL <emphasis>(author_id)</emphasis>
21192119
);
21202120
</programlisting>
21212121
如果没有指定列,外键也会将列<literal>tenant_id</literal>设置为null,但该列仍然是主键的一部分。
@@ -3467,7 +3467,7 @@ ________________________________________________________-->
34673467
</para>
34683468
________________________________________________________-->
34693469
<para>
3470-
允许从表、视图等中删除一行,(实际上,任何非平凡的<command>DELETE</command>命令都需要<literal>SELECT</literal>权限,
3470+
允许从表、视图等中<command>DELETE</command>一行,(实际上,任何非平凡的<command>DELETE</command>命令都需要<literal>SELECT</literal>权限,
34713471
因为它必须引用表列来确定要删除的行。)
34723472
</para>
34733473
<!-- pgdoc-cn_end sig_en=9bbd57033a4ff7424bd80708ec3a0a52 -->
@@ -3543,7 +3543,7 @@ ________________________________________________________-->
35433543
</para>
35443544
________________________________________________________-->
35453545
<para>
3546-
对于模式,允许在模式内创建新对象。要重命名现有对象,您必须拥有该对象<emphasis>并且</emphasis>对包含模式具有此特权
3546+
对于模式,允许在该模式内创建新对象。要重命名现有对象,您必须拥有该对象的所有权<emphasis>并且</emphasis>对该包含的模式具有此特权
35473547
</para>
35483548
<!-- pgdoc-cn_end sig_en=d2865c5194e43130981d0070114bc8a0 -->
35493549
<!-- pgdoc-cn_start sig_en=53f0c6cda49ca7a8d827c9df15c8b807 sig_cn_org=9e3e03a1a97f6c09a230c802f83fbac3 source=15.7
@@ -4130,8 +4130,8 @@ ________________________________________________________-->
41304130
________________________________________________________-->
41314131
<row>
41324132
<entry><literal>大对象</literal></entry>
4133-
<entry><literal>读写</literal></entry>
4134-
<entry></entry>
4133+
<entry><literal>rw</literal></entry>
4134+
<entry>none</entry>
41354135
<entry><literal>\dl+</literal></entry>
41364136
</row>
41374137
<!-- pgdoc-cn_end sig_en=3adbcb05e6cdd326eef06daa2d19b5b7 -->
@@ -4144,9 +4144,9 @@ ________________________________________________________-->
41444144
</row>
41454145
________________________________________________________-->
41464146
<row>
4147-
<entry><literal>参数</literal></entry>
4147+
<entry><literal>PARAMETER</literal></entry>
41484148
<entry><literal>sA</literal></entry>
4149-
<entry></entry>
4149+
<entry>none</entry>
41504150
<entry><literal>\dconfig+</literal></entry>
41514151
</row>
41524152
<!-- pgdoc-cn_end sig_en=885fc866eb7d5248d7c21a458dda9b30 -->

0 commit comments

Comments
 (0)