Skip to content

Commit e790e9a

Browse files
authored
Merge pull request #410 from ChenHuajun/master
翻译14.1 cluster.sgml等
2 parents e88b6bc + b01be45 commit e790e9a

14 files changed

+728
-259
lines changed

postgresql/doc/src/sgml/ref/cluster.sgml

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,22 @@ ____________________________________________________________________________-->
4141
<!--==========================orignal english content==========================
4242
<synopsis>
4343
CLUSTER [VERBOSE] <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
44+
CLUSTER ( <replaceable class="parameter">option</replaceable> [, ...] ) <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
4445
CLUSTER [VERBOSE]
46+
47+
<phrase>where <replaceable class="parameter">option</replaceable> can be one of:</phrase>
48+
49+
VERBOSE [ <replaceable class="parameter">boolean</replaceable> ]
4550
</synopsis>
4651
____________________________________________________________________________-->
4752
<synopsis>
4853
CLUSTER [VERBOSE] <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
54+
CLUSTER ( <replaceable class="parameter">option</replaceable> [, ...] ) <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
4955
CLUSTER [VERBOSE]
56+
57+
<phrase><replaceable class="parameter">option</replaceable> 可以是以下之一:</phrase>
58+
59+
VERBOSE [ <replaceable class="parameter">boolean</replaceable> ]
5060
</synopsis>
5161
</refsynopsisdiv>
5262

@@ -106,7 +116,7 @@ ____________________________________________________________________________-->
106116
<command>CLUSTER <replaceable class="parameter">table_name</replaceable></command>
107117
reclusters the table using the same index as before. You can also
108118
use the <literal>CLUSTER</literal> or <literal>SET WITHOUT CLUSTER</literal>
109-
forms of <xref linkend="sql-altertable"/> to set the index to be used for
119+
forms of <link linkend="sql-altertable"><command>ALTER TABLE</command></link> to set the index to be used for
110120
future cluster operations, or to clear any previous setting.
111121
</para>
112122
____________________________________________________________________________-->
@@ -115,7 +125,7 @@ ____________________________________________________________________________-->
115125
会记住它是按照哪个索引聚簇的。形式
116126
<command>CLUSTER <replaceable class="parameter">table_name</replaceable></command>
117127
会使用前面所用的同一个索引对表重新聚簇。你也可以使用
118-
<literal>CLUSTER</literal>或者<xref linkend="sql-altertable"/>
128+
<literal>CLUSTER</literal>或者<link linkend="sql-altertable"><command>ALTER TABLE</command></link>
119129
的<literal>SET WITHOUT CLUSTER</literal>形式把索引设置为可用于
120130
未来的聚簇操作,或者清除任何之前的设置。
121131
</para>
@@ -208,6 +218,32 @@ ____________________________________________________________________________-->
208218
</para>
209219
</listitem>
210220
</varlistentry>
221+
222+
<varlistentry>
223+
<!--==========================orignal english content==========================
224+
<term><replaceable class="parameter">boolean</replaceable></term>
225+
____________________________________________________________________________-->
226+
<term><replaceable class="parameter">boolean</replaceable></term>
227+
<listitem>
228+
<!--==========================orignal english content==========================
229+
<para>
230+
Specifies whether the selected option should be turned on or off.
231+
You can write <literal>TRUE</literal>, <literal>ON</literal>, or
232+
<literal>1</literal> to enable the option, and <literal>FALSE</literal>,
233+
<literal>OFF</literal>, or <literal>0</literal> to disable it. The
234+
<replaceable class="parameter">boolean</replaceable> value can also
235+
be omitted, in which case <literal>TRUE</literal> is assumed.
236+
</para>
237+
____________________________________________________________________________-->
238+
<para>
239+
指定打开还是关闭选定的选项。你可以输入<literal>TRUE</literal>、
240+
<literal>ON</literal>或<literal>1</literal>启用该选项,
241+
或者输入<literal>FALSE</literal>、<literal>OFF</literal>或<literal>0</literal>禁用它。
242+
也可以省略这个<replaceable class="parameter">boolean</replaceable>值,
243+
在这种情况下,假设其值为<literal>TRUE</literal>。
244+
</para>
245+
</listitem>
246+
</varlistentry>
211247
</variablelist>
212248
</refsect1>
213249

@@ -306,14 +342,14 @@ ____________________________________________________________________________-->
306342
<!--==========================orignal english content==========================
307343
<para>
308344
Because the planner records statistics about the ordering of
309-
tables, it is advisable to run <xref linkend="sql-analyze"/>
345+
tables, it is advisable to run <link linkend="sql-analyze"><command>ANALYZE</command></link>
310346
on the newly clustered table.
311347
Otherwise, the planner might make poor choices of query plans.
312348
</para>
313349
____________________________________________________________________________-->
314350
<para>
315351
因为规划器会记录有关表顺序的统计信息,建议在新近被聚簇的表上
316-
运行<xref linkend="sql-analyze"/>。否则,规划器可能会产生很差
352+
运行<link linkend="sql-analyze"><command>ANALYZE</command></link>。否则,规划器可能会产生很差
317353
的查询计划。
318354
</para>
319355

@@ -333,6 +369,18 @@ ____________________________________________________________________________-->
333369
表就会被周期性地重新聚簇。
334370
</para>
335371

372+
<!--==========================orignal english content==========================
373+
<para>
374+
Each backend running <command>CLUSTER</command> will report its progress
375+
in the <structname>pg_stat_progress_cluster</structname> view. See
376+
<xref linkend="cluster-progress-reporting"/> for details.
377+
</para>
378+
____________________________________________________________________________-->
379+
<para>
380+
运行<command>CLUSTER</command>的每个后端将在
381+
<structname>pg_stat_progress_cluster</structname>视图中报告其进度。
382+
有关详细信息,请参见<xref linkend="cluster-progress-reporting"/>。
383+
</para>
336384
</refsect1>
337385

338386
<refsect1>
@@ -429,6 +477,7 @@ ____________________________________________________________________________-->
429477

430478
<simplelist type="inline">
431479
<member><xref linkend="app-clusterdb"/></member>
480+
<member><xref linkend="cluster-progress-reporting"/></member>
432481
</simplelist>
433482
</refsect1>
434483
</refentry>

postgresql/doc/src/sgml/ref/comment.sgml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -275,20 +275,16 @@ ____________________________________________________________________________-->
275275
<listitem>
276276
<!--==========================orignal english content==========================
277277
<para>
278-
The name of the object to be commented. Names of tables,
279-
aggregates, collations, conversions, domains, foreign tables, functions,
280-
indexes, operators, operator classes, operator families, procedures, routines, sequences,
281-
statistics, text search objects, types, and views can be
278+
The name of the object to be commented. Names of objects that reside in
279+
schemas (tables, functions, etc.) can be
282280
schema-qualified. When commenting on a column,
283281
<replaceable class="parameter">relation_name</replaceable> must refer
284282
to a table, view, composite type, or foreign table.
285283
</para>
286284
____________________________________________________________________________-->
287285
<para>
288-
要被注释的对象的名称。表、聚集、排序方式、转换、域、外部表、函数、
289-
索引、操作符、操作符类、操作符族、存储过程、例程、序列、统计信息、文本搜索对象、类型和视图
290-
的名称可以被模式限定。在注释一列时,
291-
<replaceable class="parameter">relation_name</replaceable>必须
286+
要被注释的对象的名称。驻留在模式(表、函数等)中的对象的名称可以是模式限定的。
287+
在注释一列时,<replaceable class="parameter">relation_name</replaceable>必须
292288
引用一个表、视图、组合类型或者外部表。
293289
</para>
294290
</listitem>
@@ -453,11 +449,11 @@ ____________________________________________________________________________-->
453449
<para>
454450
The data type(s) of the operator's arguments (optionally
455451
schema-qualified). Write <literal>NONE</literal> for the missing argument
456-
of a prefix or postfix operator.
452+
of a prefix operator.
457453
</para>
458454
____________________________________________________________________________-->
459455
<para>
460-
操作符的参数的数据类型(可以是模式限定的)。对一个前缀后后缀操作符
456+
操作符的参数的数据类型(可以是模式限定的)。对一个前缀操作符
461457
的缺失参数可以写<literal>NONE</literal>。
462458
</para>
463459
</listitem>

postgresql/doc/src/sgml/ref/copy.sgml

Lines changed: 71 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,19 @@ ____________________________________________________________________________-->
160160
<literal>STDIN</literal>或者<literal>STDOUT</literal>时,数据会通过客
161161
户端和服务器之间的连接传输。
162162
</para>
163+
164+
<!--==========================orignal english content==========================
165+
<para>
166+
Each backend running <command>COPY</command> will report its progress
167+
in the <structname>pg_stat_progress_copy</structname> view. See
168+
<xref linkend="copy-progress-reporting"/> for details.
169+
</para>
170+
____________________________________________________________________________-->
171+
<para>
172+
运行<command>COPY</command>的每个后端将在
173+
<structname>pg_stat_progress_copy</structname>视图中报告其进度。
174+
有关详细信息,请参见<xref linkend="copy-progress-reporting"/>。
175+
</para>
163176
</refsect1>
164177

165178
<refsect1>
@@ -213,17 +226,21 @@ ____________________________________________________________________________-->
213226
<listitem>
214227
<!--==========================orignal english content==========================
215228
<para>
216-
A <xref linkend="sql-select"/>, <xref linkend="sql-values"/>,
217-
<xref linkend="sql-insert"/>, <xref linkend="sql-update"/> or
218-
<xref linkend="sql-delete"/> command whose results are to be
229+
A <link linkend="sql-select"><command>SELECT</command></link>,
230+
<link linkend="sql-values"><command>VALUES</command></link>,
231+
<link linkend="sql-insert"><command>INSERT</command></link>,
232+
<link linkend="sql-update"><command>UPDATE</command></link>, or
233+
<link linkend="sql-delete"><command>DELETE</command></link> command whose results are to be
219234
copied. Note that parentheses are required around the query.
220235
</para>
221236
____________________________________________________________________________-->
222237
<para>
223-
其结果要被复制的<xref linkend="sql-select"/>、
224-
<xref linkend="sql-values"/>、
225-
<xref linkend="sql-insert"/>、<xref linkend="sql-update"/>或者
226-
<xref linkend="sql-delete"/>命令。注意查询周围的圆括号是必要的。
238+
其结果要被复制的<link linkend="sql-select"><command>SELECT</command></link>、
239+
<link linkend="sql-values"><command>VALUES</command></link>、
240+
<link linkend="sql-insert"><command>INSERT</command></link>、
241+
<link linkend="sql-update"><command>UPDATE</command></link>或者
242+
<link linkend="sql-delete"><command>DELETE</command></link>命令。
243+
注意查询周围的圆括号是必要的。
227244
</para>
228245
<!--==========================orignal english content==========================
229246
<para>
@@ -759,16 +776,25 @@ ____________________________________________________________________________-->
759776

760777
<!--==========================orignal english content==========================
761778
<para>
762-
<command>COPY TO</command> can only be used with plain tables, not
763-
with views. However, you can write <literal>COPY (SELECT * FROM
764-
<replaceable class="parameter">viewname</replaceable>) TO ...</literal>
765-
to copy the current contents of a view.
779+
<command>COPY TO</command> can be used only with plain
780+
tables, not views, and does not copy rows from child tables
781+
or child partitions. For example, <literal>COPY <replaceable
782+
class="parameter">table</replaceable> TO</literal> copies
783+
the same rows as <literal>SELECT * FROM ONLY <replaceable
784+
class="parameter">table</replaceable></literal>.
785+
The syntax <literal>COPY (SELECT * FROM <replaceable
786+
class="parameter">table</replaceable>) TO ...</literal> can be used to
787+
dump all of the rows in an inheritance hierarchy, partitioned table,
788+
or view.
766789
</para>
767790
____________________________________________________________________________-->
768791
<para>
769-
<command>COPY TO</command>只能被用于纯粹的表,不能用于视图。
770-
不过你可以写<literal>COPY (SELECT * FROM
771-
<replaceable class="parameter">viewname</replaceable>) TO ...</literal>来拷贝一个视图的当前内容。
792+
<command>COPY TO</command>只能用于普通表,而不能用于视图,并且不能从子表或子分区复制行。
793+
例如,<literal>COPY <replaceable class="parameter">table</replaceable> TO</literal>
794+
复制与<literal>SELECT * FROM ONLY <replaceable class="parameter">table</replaceable></literal>
795+
相同的行。
796+
语法<literal>COPY (SELECT * FROM <replaceable class="parameter">table</replaceable>) TO ...</literal>
797+
可用于转储一个继承层次结构、分区表或视图中的所有行。
772798
</para>
773799

774800
<!--==========================orignal english content==========================
@@ -782,26 +808,6 @@ ____________________________________________________________________________-->
782808
<command>COPY FROM</command>可以被用于普通表、外部表、分区表或者具有<literal>INSTEAD OF INSERT</literal>触发器的视图。
783809
</para>
784810

785-
<!--==========================orignal english content==========================
786-
<para>
787-
<command>COPY</command> only deals with the specific table named;
788-
it does not copy data to or from child tables. Thus for example
789-
<literal>COPY <replaceable class="parameter">table</replaceable> TO</literal>
790-
shows the same data as <literal>SELECT * FROM ONLY <replaceable
791-
class="parameter">table</replaceable></literal>. But <literal>COPY
792-
(SELECT * FROM <replaceable class="parameter">table</replaceable>) TO ...</literal>
793-
can be used to dump all of the data in an inheritance hierarchy.
794-
</para>
795-
____________________________________________________________________________-->
796-
<para>
797-
<command>COPY</command>只处理提到的表,它不会从子表复制
798-
数据或者复制数据到子表中。例如
799-
<literal>COPY <replaceable class="parameter">table</replaceable> TO</literal>
800-
会显示与<literal>SELECT * FROM ONLY <replaceable
801-
class="parameter">table</replaceable></literal>相同的数据。而<literal>COPY
802-
(SELECT * FROM <replaceable class="parameter">table</replaceable>) TO ...</literal>
803-
可以被用来转储一个继承层次中的所有数据。
804-
</para>
805811

806812
<!--==========================orignal english content==========================
807813
<para>
@@ -845,7 +851,7 @@ ____________________________________________________________________________-->
845851
by the server, not by the client application, must be executable by the
846852
<productname>PostgreSQL</productname> user.
847853
<command>COPY</command> naming a file or command is only allowed to
848-
database superusers or users who are granted one of the default roles
854+
database superusers or users who are granted one of the roles
849855
<literal>pg_read_server_files</literal>,
850856
<literal>pg_write_server_files</literal>,
851857
or <literal>pg_execute_server_program</literal>, since it allows reading
@@ -861,7 +867,9 @@ ____________________________________________________________________________-->
861867
ID)可访问的并且是可读或者可写的。类似地,用<literal>PROGRAM</literal>
862868
指定的命令也会由服务器(不是客户端应用)直接执行,它也必须是
863869
<productname>PostgreSQL</productname>用户可以执行的。
864-
只允许数据库超级用户或者授予了默认角色<literal>pg_read_server_files</literal>、<literal>pg_write_server_files</literal>及<literal>pg_execute_server_program</literal>之一的用户<command>COPY</command>一个文件或者命令,
870+
只允许数据库超级用户或者授予了角色<literal>pg_read_server_files</literal>、
871+
<literal>pg_write_server_files</literal>及<literal>pg_execute_server_program</literal>
872+
之一的用户<command>COPY</command>一个文件或者命令,
865873
因为它允许读取或者写入服务器有特权访问的任何文件或者运行服务器有特权访问的程序。
866874
</para>
867875

@@ -1149,12 +1157,12 @@ ____________________________________________________________________________-->
11491157
<row>
11501158
<entry><literal>\</literal><replaceable>digits</replaceable></entry>
11511159
<entry>Backslash followed by one to three octal digits specifies
1152-
the character with that numeric code</entry>
1160+
the byte with that numeric code</entry>
11531161
</row>
11541162
<row>
11551163
<entry><literal>\x</literal><replaceable>digits</replaceable></entry>
11561164
<entry>Backslash <literal>x</literal> followed by one or two hex digits specifies
1157-
the character with that numeric code</entry>
1165+
the byte with that numeric code</entry>
11581166
</row>
11591167
</tbody>
11601168
</tgroup>
@@ -1204,17 +1212,17 @@ ____________________________________________________________________________-->
12041212
</row>
12051213
<row>
12061214
<entry><literal>\</literal><replaceable>digits</replaceable></entry>
1207-
<entry>反斜线后跟一到三个十进制位表示该数字代码对应的字符</entry>
1215+
<entry>反斜线后跟一到三个八进制数字表示该数字代码对应的字节</entry>
12081216
</row>
12091217
<row>
12101218
<entry><literal>\x</literal><replaceable>digits</replaceable></entry>
1211-
<entry>反斜线加<literal>x</literal>后跟一到三个十六进制位表示该数字代码对应的字符</entry>
1219+
<entry>反斜线加<literal>x</literal>后跟一到三个十六进制数字表示该数字代码对应的字节</entry>
12121220
</row>
12131221
</tbody>
12141222
</tgroup>
12151223
</informaltable>
12161224

1217-
当前,<command>COPY TO</command>不会发出一个十进制或十六进制位
1225+
当前,<command>COPY TO</command>不会发出一个八进制或十六进制位
12181226
反斜线序列,但是它确实把上面列出的其他序列用于那些控制字符。
12191227
</para>
12201228

@@ -1256,6 +1264,17 @@ ____________________________________________________________________________-->
12561264
传输<command>COPY</command>文件,它们也很容易受到破坏。
12571265
</para>
12581266

1267+
<!--==========================orignal english content==========================
1268+
<para>
1269+
All backslash sequences are interpreted after encoding conversion.
1270+
The bytes specified with the octal and hex-digit backslash sequences must
1271+
form valid characters in the database encoding.
1272+
</para>
1273+
____________________________________________________________________________-->
1274+
<para>
1275+
所有反斜杠序列都在编码转换后进行解释。
1276+
用八进制和十六进制数字反斜杠序列指定的字节必须在数据库编码中形成有效字符。
1277+
</para>
12591278
<!--==========================orignal english content==========================
12601279
<para>
12611280
<command>COPY TO</command> will terminate each row with a Unix-style
@@ -2000,4 +2019,15 @@ COPY [ BINARY ] <replaceable class="parameter">table_name</replaceable>
20002019
[ WITH NULL AS '<replaceable class="parameter">null_string</replaceable>' ]
20012020
</synopsis></para>
20022021
</refsect1>
2022+
2023+
<refsect1>
2024+
<!--==========================orignal english content==========================
2025+
<title>See Also</title>
2026+
____________________________________________________________________________-->
2027+
<title>另见</title>
2028+
2029+
<simplelist type="inline">
2030+
<member><xref linkend="copy-progress-reporting"/></member>
2031+
</simplelist>
2032+
</refsect1>
20032033
</refentry>

0 commit comments

Comments
 (0)