Skip to content

Commit f6f4c11

Browse files
authored
Merge pull request #340 from zaizai1997/master
新增翻译
2 parents 9d95390 + 23aa2fc commit f6f4c11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+5077
-2894
lines changed

postgresql/doc/src/sgml/ref/drop_database.sgml

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,19 @@ ____________________________________________________________________________-->
4040
<refsynopsisdiv>
4141
<!--==========================orignal english content==========================
4242
<synopsis>
43-
DROP DATABASE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
43+
DROP DATABASE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ [ WITH ] ( <replaceable class="parameter">option</replaceable> [, ...] ) ]
44+
45+
<phrase>where <replaceable class="parameter">option</replaceable> can be:</phrase>
46+
47+
FORCE
4448
</synopsis>
4549
____________________________________________________________________________-->
4650
<synopsis>
47-
DROP DATABASE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
51+
DROP DATABASE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ [ WITH ] ( <replaceable class="parameter">option</replaceable> [, ...] ) ]
52+
53+
<phrase>其中<replaceable class="parameter">选项</replaceable> 可以是:</phrase>
54+
55+
FORCE
4856
</synopsis>
4957
</refsynopsisdiv>
5058

@@ -59,17 +67,20 @@ ____________________________________________________________________________-->
5967
<command>DROP DATABASE</command> drops a database. It removes the
6068
catalog entries for the database and deletes the directory
6169
containing the data. It can only be executed by the database owner.
62-
Also, it cannot be executed while you or anyone else are connected
63-
to the target database. (Connect to <literal>postgres</literal> or any
64-
other database to issue this command.)
70+
It cannot be executed while you are connected to the target database.
71+
(Connect to <literal>postgres</literal> or any other database to issue this
72+
command.)
73+
Also, if anyone else is connected to the target database, this command will
74+
fail unless you use the <literal>FORCE</literal> option described below.
6575
</para>
6676
____________________________________________________________________________-->
6777
<para>
6878
<command>DROP DATABASE</command>移除一个数据库。它会
6979
移除该数据库的系统目录项并且删除包含数据的文件目录。它只能由数据库
70-
拥有者执行。还有,当你或者任何其他人已经连接到目标数据库时,它不能
71-
被执行(连接到<literal>postgres</literal>或者任何其他数据库来发出这
72-
个命令)。
80+
拥有者执行。当你已经连接到目标数据库时,它不能被执行(连接
81+
到<literal>postgres</literal>或者任何其他数据库来发出这个命令)。
82+
另外,如果其他任何人已经连接到目标数据库,这个命令将会失败,除非您
83+
使用以下所述的<literal>FORCE</literal>选项。
7384
</para>
7485

7586
<!--==========================orignal english content==========================
@@ -123,6 +134,41 @@ ____________________________________________________________________________-->
123134
</para>
124135
</listitem>
125136
</varlistentry>
137+
138+
<varlistentry>
139+
<term><literal>FORCE</literal></term>
140+
<listitem>
141+
142+
<!--==========================orignal english content==========================
143+
<para>
144+
Attempt to terminate all existing connections to the target database.
145+
It doesn't terminate if prepared transactions, active logical replication
146+
slots or subscriptions are present in the target database.
147+
</para>
148+
____________________________________________________________________________-->
149+
<para>
150+
尝试终止与目标数据库的所有现有连接。
151+
如果目标数据库中存在准备好的事务、活跃的逻辑复制槽或订阅,则不会终止。
152+
</para>
153+
154+
<!--==========================orignal english content==========================
155+
<para>
156+
This will fail if the current user has no permissions to terminate other
157+
connections. Required permissions are the same as with
158+
<literal>pg_terminate_backend</literal>, described in
159+
<xref linkend="functions-admin-signal"/>. This will also fail if we
160+
are not able to terminate connections.
161+
</para>
162+
____________________________________________________________________________-->
163+
<para>
164+
如果当前用户没有终止其他连接的权限,则此操作将失败。所需权限与
165+
<xref linkend="functions-admin-signal"/>中描述的
166+
<literal>pg_terminate_backend</literal>相同。如果我们不能
167+
终止连接,则此操作也将会失败。
168+
</para>
169+
</listitem>
170+
</varlistentry>
171+
126172
</variablelist>
127173
</refsect1>
128174

postgresql/doc/src/sgml/ref/drop_foreign_table.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<!-- doc/src/sgml/ref/drop_foreign_table.sgml -->
1+
<!--
2+
doc/src/sgml/ref/drop_foreign_table.sgml
3+
PostgreSQL documentation
4+
-->
25

36
<refentry id="sql-dropforeigntable">
47
<!--==========================orignal english content==========================
@@ -177,7 +180,7 @@ ____________________________________________________________________________-->
177180

178181
<!--==========================orignal english content==========================
179182
<para>
180-
This command conforms to the ISO/IEC 9075-9 (SQL/MED), except that the
183+
This command conforms to ISO/IEC 9075-9 (SQL/MED), except that the
181184
standard only allows one foreign table to be dropped per command, and apart
182185
from the <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname>
183186
extension.

postgresql/doc/src/sgml/ref/drop_function.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,7 @@ ____________________________________________________________________________-->
315315
<listitem>
316316
<para>The ability to specify argument modes and names</para>
317317
</listitem>
318-
</itemizedlist>
319-
</para>
318+
</itemizedlist></para>
320319
____________________________________________________________________________-->
321320
<para>
322321
该命令符合SQL标准,使用这些<productname>PostgreSQL</productname>扩展:
@@ -330,8 +329,7 @@ ____________________________________________________________________________-->
330329
<listitem>
331330
<para>能够指定参数模式和名称</para>
332331
</listitem>
333-
</itemizedlist>
334-
</para>
332+
</itemizedlist></para>
335333
</refsect1>
336334

337335
<refsect1>

postgresql/doc/src/sgml/ref/drop_index.sgml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ ____________________________________________________________________________-->
104104
Also, regular <command>DROP INDEX</command> commands can be
105105
performed within a transaction block, but
106106
<command>DROP INDEX CONCURRENTLY</command> cannot.
107+
Lastly, indexes on partitioned tables cannot be dropped using this
108+
option.
107109
</para>
108110
____________________________________________________________________________-->
109111
<para>
@@ -112,6 +114,7 @@ ____________________________________________________________________________-->
112114
<literal>PRIMARY KEY</literal>约束的索引不能以这种方式删除)。还有,常规
113115
的<command>DROP INDEX</command>命令可以在一个事务块内执行,而
114116
<command>DROP INDEX CONCURRENTLY</command>不能。
117+
最后,不能使用此选项删除分区表上的索引。
115118
</para>
116119
<!--==========================orignal english content==========================
117120
<para>

postgresql/doc/src/sgml/ref/drop_procedure.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ ____________________________________________________________________________-->
247247
<listitem>
248248
<para>The ability to specify argument modes and names</para>
249249
</listitem>
250-
</itemizedlist>
251-
</para>
250+
</itemizedlist></para>
252251
____________________________________________________________________________-->
253252
<para>
254253
这个命令符合SQL标准,不过<productname>PostgreSQL</productname>做了这些扩展:
@@ -262,8 +261,7 @@ ____________________________________________________________________________-->
262261
<listitem>
263262
<para>指定参数模式和名称的能力</para>
264263
</listitem>
265-
</itemizedlist>
266-
</para>
264+
</itemizedlist></para>
267265
</refsect1>
268266

269267
<refsect1>

postgresql/doc/src/sgml/ref/drop_routine.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ ____________________________________________________________________________-->
120120
<listitem>
121121
<para>Aggregate functions are an extension.</para>
122122
</listitem>
123-
</itemizedlist>
124-
</para>
123+
</itemizedlist></para>
125124
____________________________________________________________________________-->
126125
<para>
127126
这个命令符合SQL标准,不过<productname>PostgreSQL</productname>做了下面这些扩展:
@@ -138,8 +137,7 @@ ____________________________________________________________________________-->
138137
<listitem>
139138
<para>聚集函数是一种扩展。</para>
140139
</listitem>
141-
</itemizedlist>
142-
</para>
140+
</itemizedlist></para>
143141
</refsect1>
144142

145143
<refsect1>

postgresql/doc/src/sgml/ref/drop_transform.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<!-- doc/src/sgml/ref/drop_transform.sgml -->
1+
<!--
2+
doc/src/sgml/ref/drop_transform.sgml
3+
PostgreSQL documentation
4+
-->
25

36
<refentry id="sql-droptransform">
47
<!--==========================orignal english content==========================

postgresql/doc/src/sgml/ref/dropdb.sgml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@ ____________________________________________________________________________-->
119119
</listitem>
120120
</varlistentry>
121121

122+
<varlistentry>
123+
<term><option>-f</option></term>
124+
<term><option>--force</option></term>
125+
<listitem>
126+
<para>
127+
Attempt to terminate all existing connections to the target database
128+
before dropping it. See <xref linkend="sql-dropdatabase"/> for more
129+
information on this option.
130+
</para>
131+
</listitem>
132+
</varlistentry>
133+
122134
<varlistentry>
123135
<term><option>-i</option></term>
124136
<term><option>-&minus;interactive</option></term>
@@ -187,6 +199,17 @@ ____________________________________________________________________________-->
187199
</listitem>
188200
</varlistentry>
189201

202+
<varlistentry>
203+
<term><option>-f</option></term>
204+
<term><option>--force</option></term>
205+
<listitem>
206+
<para>
207+
在删除目标数据库之前,尝试终止与该数据库的所有现有连接。有关此选项的
208+
详细信息,请参见<xref linkend="sql-dropdatabase"/>。
209+
</para>
210+
</listitem>
211+
</varlistentry>
212+
190213
<varlistentry>
191214
<term><option>-i</option></term>
192215
<term><option>--interactive</option></term>
@@ -315,6 +338,9 @@ ____________________________________________________________________________-->
315338
target database. If not specified, the <literal>postgres</literal>
316339
database will be used; if that does not exist (or is the database
317340
being dropped), <literal>template1</literal> will be used.
341+
This can be a <link linkend="libpq-connstring">connection
342+
string</link>. If so, connection string parameters will override any
343+
conflicting command line options.
318344
</para>
319345
</listitem>
320346
</varlistentry>
@@ -384,6 +410,7 @@ ____________________________________________________________________________-->
384410
<listitem>
385411
<para>
386412
指定要连接到来发现哪些其他数据库应该被删除的数据库名。如果没有指定,将使用<literal>postgres</literal>数据库。而如果它也不存在,将使用<literal>template1</literal>。
413+
这可以是<link linkend="libpq-connstring">连接字符串</link>。 如果是这样,连接字符串参数将覆盖任何冲突的命令行选项。
387414
</para>
388415
</listitem>
389416
</varlistentry>
@@ -433,8 +460,8 @@ ____________________________________________________________________________-->
433460
<listitem>
434461
<!--==========================orignal english content==========================
435462
<para>
436-
Specifies whether to use color in diagnostics messages. Possible values
437-
are <literal>always</literal>, <literal>auto</literal>,
463+
Specifies whether to use color in diagnostic messages. Possible values
464+
are <literal>always</literal>, <literal>auto</literal> and
438465
<literal>never</literal>.
439466
</para>
440467
____________________________________________________________________________-->

postgresql/doc/src/sgml/ref/dropuser.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ ____________________________________________________________________________-->
415415
<listitem>
416416
<!--==========================orignal english content==========================
417417
<para>
418-
Specifies whether to use color in diagnostics messages. Possible values
419-
are <literal>always</literal>, <literal>auto</literal>,
418+
Specifies whether to use color in diagnostic messages. Possible values
419+
are <literal>always</literal>, <literal>auto</literal> and
420420
<literal>never</literal>.
421421
</para>
422422
____________________________________________________________________________-->

postgresql/doc/src/sgml/ref/ecpg-ref.sgml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,40 @@ ____________________________________________________________________________-->
7575
<!--==========================orignal english content==========================
7676
<para>
7777
<command>ecpg</command> will convert each input file given on the
78-
command line to the corresponding C output file. Input files
79-
preferably have the extension <filename>.pgc</filename>.
80-
The extension will be replaced by <filename>.c</filename> to
81-
determine the output file name.
82-
The output file name can also be overridden using the
78+
command line to the corresponding C output file. If an input file
79+
name does not have any extension, <filename>.pgc</filename> is
80+
assumed. The file's extension will be replaced
81+
by <filename>.c</filename> to construct the output file name.
82+
But the output file name can be overridden using the
8383
<option>-o</option> option.
8484
</para>
8585
____________________________________________________________________________-->
8686
<para>
8787
<command>ecpg</command>将把命令行中给出的每一个输入文件转换为相应的 C 输出文件。
88-
输入文件更适宜于使用扩展名<filename>.pgc</filename>。
89-
该扩展名将被替换为<filename>.c</filename>来决定输出文件名。
90-
输出文件名也可以使用<option>-o</option>选项覆盖。
88+
如果输入文件名没有任何扩展名,则假定为<filename>.pgc</filename>。文件扩展名将由
89+
<filename>.c</filename>替换以构造输出文件名。
90+
但是输出文件名可以使用<option>-o</option>选项覆盖。
91+
</para>
92+
93+
<!--==========================orignal english content==========================
94+
<para>
95+
If an input file name is just <literal>-</literal>,
96+
<command>ecpg</command> reads the program from standard input
97+
(and writes to standard output, unless that is overridden
98+
with <option>-o</option>).
99+
</para>
100+
____________________________________________________________________________-->
101+
<para>
102+
如果输入文件名只是<literal>-</literal>,<command>ecpg</command>从标准输入
103+
读取程序(并写入标准输出,除非用<option>-o</option>重写)。
91104
</para>
92105

93106
<!--==========================orignal english content==========================
94107
<para>
95108
This reference page does not describe the embedded SQL language.
96109
See <xref linkend="ecpg"/> for more information on that topic.
97110
</para>
111+
98112
____________________________________________________________________________-->
99113
<para>
100114
这个参考页没有描述嵌入式 SQL 语言。关于该主题请参考<xref linkend="ecpg"/>。
@@ -145,6 +159,7 @@ ____________________________________________________________________________-->
145159
</varlistentry>
146160

147161
<varlistentry>
162+
148163
<term><option>-i</option></term>
149164
<listitem>
150165
<para>
@@ -175,6 +190,7 @@ ____________________________________________________________________________-->
175190
<para>
176191
Specifies that <command>ecpg</command> should write all
177192
its output to the given <replaceable>filename</replaceable>.
193+
Write <literal>-o -</literal> to send all output to standard output.
178194
</para>
179195
</listitem>
180196
</varlistentry>
@@ -294,6 +310,17 @@ ____________________________________________________________________________-->
294310
</listitem>
295311
</varlistentry>
296312

313+
<varlistentry>
314+
<term><option>-h</option></term>
315+
<listitem>
316+
<para>
317+
处理头文件。指定此选项后,输出文件扩展名变为<literal>.h</literal>而不是
318+
<literal>.c</literal>,默认输入文件扩展名为<literal>.pgh</literal>
319+
而不是<literal>.pgc</literal>。此外,将强制启用<option>-c</option>选项。
320+
</para>
321+
</listitem>
322+
</varlistentry>
323+
297324
<varlistentry>
298325
<term><option>-i</option></term>
299326
<listitem>
@@ -317,6 +344,7 @@ ____________________________________________________________________________-->
317344
<listitem>
318345
<para>
319346
指定<command>ecpg</command>应该将它的所有输出写到给定的<replaceable>filename</replaceable>。
347+
写<literal>-o-</literal>将所有输出发送到标准输出。
320348
</para>
321349
</listitem>
322350
</varlistentry>

0 commit comments

Comments
 (0)