@@ -1060,7 +1060,7 @@ ________________________________________________________-->
1060
1060
________________________________________________________-->
1061
1061
<para>
1062
1062
如果您想要的是在插入行时对其他行进行一次性检查,而不是持续维护一致性保证,
1063
- 可以使用自定义<link linkend="triggers">触发器</link>来实现。 (这种方法避免了
1063
+ 可以使用自定义<link linkend="triggers">触发器(trigger) </link>来实现。 (这种方法避免了
1064
1064
转储/恢复问题,因为<application>pg_dump</application>在恢复数据之后才重新安装触发器,
1065
1065
因此在转储/恢复期间不会强制执行检查。)
1066
1066
</para>
@@ -2101,21 +2101,21 @@ ________________________________________________________-->
2101
2101
通常,外键约束的所有列都会被设置;仅设置子集在某些特殊情况下很有用。考虑以下示例:
2102
2102
<programlisting>
2103
2103
CREATE TABLE tenants (
2104
- tenant_id integer 主键
2104
+ tenant_id integer PRIMARY KEY
2105
2105
);
2106
2106
2107
2107
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)
2111
2111
);
2112
2112
2113
2113
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 ,
2116
2116
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>
2119
2119
);
2120
2120
</programlisting>
2121
2121
如果没有指定列,外键也会将列<literal>tenant_id</literal>设置为null,但该列仍然是主键的一部分。
@@ -3467,7 +3467,7 @@ ________________________________________________________-->
3467
3467
</para>
3468
3468
________________________________________________________-->
3469
3469
<para>
3470
- 允许从表、视图等中删除一行 ,(实际上,任何非平凡的<command>DELETE</command>命令都需要<literal>SELECT</literal>权限,
3470
+ 允许从表、视图等中<command>DELETE</command>一行 ,(实际上,任何非平凡的<command>DELETE</command>命令都需要<literal>SELECT</literal>权限,
3471
3471
因为它必须引用表列来确定要删除的行。)
3472
3472
</para>
3473
3473
<!-- pgdoc-cn_end sig_en=9bbd57033a4ff7424bd80708ec3a0a52 -->
@@ -3543,7 +3543,7 @@ ________________________________________________________-->
3543
3543
</para>
3544
3544
________________________________________________________-->
3545
3545
<para>
3546
- 对于模式,允许在模式内创建新对象 。要重命名现有对象,您必须拥有该对象 <emphasis>并且</emphasis>对包含模式具有此特权 。
3546
+ 对于模式,允许在该模式内创建新对象 。要重命名现有对象,您必须拥有该对象的所有权 <emphasis>并且</emphasis>对该包含的模式具有此特权 。
3547
3547
</para>
3548
3548
<!-- pgdoc-cn_end sig_en=d2865c5194e43130981d0070114bc8a0 -->
3549
3549
<!-- pgdoc-cn_start sig_en=53f0c6cda49ca7a8d827c9df15c8b807 sig_cn_org=9e3e03a1a97f6c09a230c802f83fbac3 source=15.7
@@ -4130,8 +4130,8 @@ ________________________________________________________-->
4130
4130
________________________________________________________-->
4131
4131
<row>
4132
4132
<entry><literal>大对象</literal></entry>
4133
- <entry><literal>读写 </literal></entry>
4134
- <entry>无 </entry>
4133
+ <entry><literal>rw </literal></entry>
4134
+ <entry>none </entry>
4135
4135
<entry><literal>\dl+</literal></entry>
4136
4136
</row>
4137
4137
<!-- pgdoc-cn_end sig_en=3adbcb05e6cdd326eef06daa2d19b5b7 -->
@@ -4144,9 +4144,9 @@ ________________________________________________________-->
4144
4144
</row>
4145
4145
________________________________________________________-->
4146
4146
<row>
4147
- <entry><literal>参数 </literal></entry>
4147
+ <entry><literal>PARAMETER </literal></entry>
4148
4148
<entry><literal>sA</literal></entry>
4149
- <entry>无 </entry>
4149
+ <entry>none </entry>
4150
4150
<entry><literal>\dconfig+</literal></entry>
4151
4151
</row>
4152
4152
<!-- pgdoc-cn_end sig_en=885fc866eb7d5248d7c21a458dda9b30 -->
0 commit comments