Skip to content

Commit 4874e73

Browse files
committed
423
1 parent 4cd7f0c commit 4874e73

26 files changed

+1400
-548
lines changed

postgresql/doc/src/sgml/ref/createdb.sgml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -664,18 +664,19 @@ ____________________________________________________________________________-->
664664
<para>
665665
To create the database <literal>demo</literal> using the
666666
server on host <literal>eden</>, port 5000, using the
667-
<literal>LATIN1</literal> encoding scheme with a look at the
668-
underlying command:
667+
<literal>template0</literal> template database, here is the
668+
command-line command and the underlying SQL command:
669669
<screen>
670-
<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -E LATIN1 -e demo</userinput>
671-
<computeroutput>CREATE DATABASE demo ENCODING 'LATIN1';</computeroutput>
670+
<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -T template0 -e demo</userinput>
671+
<computeroutput>CREATE DATABASE demo TEMPLATE template0;</computeroutput>
672672
</screen></para>
673673
____________________________________________________________________________-->
674674
<para>
675-
要在主机<literal>eden</>、端口 5000 上使用<literal>LATIN1</literal>编码模式创建数据库<literal>demo</literal>,看看下面的命令:
675+
要在主机<literal>eden</>、端口 5000 上使用<literal>template0</literal>
676+
模板数据库创建数据库<literal>demo</literal>,这里是命令行命令和底层SQL命令:
676677
<screen>
677-
<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -E LATIN1 -e demo</userinput>
678-
<computeroutput>CREATE DATABASE demo ENCODING 'LATIN1';</computeroutput>
678+
<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -T template0 -e demo</userinput>
679+
<computeroutput>CREATE DATABASE demo TEMPLATE template0;</computeroutput>
679680
</screen></para>
680681
</refsect1>
681682

postgresql/doc/src/sgml/ref/createuser.sgml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ ____________________________________________________________________________-->
172172
<term><option>-&minus;encrypted</></term>
173173
<listitem>
174174
<para>
175-
Encrypts the user's password stored in the database. If not
176-
specified, the default password behavior is used.
175+
This option is obsolete but still accepted for backward
176+
compatibility.
177177
</para>
178178
</listitem>
179179
</varlistentry>
@@ -252,17 +252,6 @@ ____________________________________________________________________________-->
252252
</listitem>
253253
</varlistentry>
254254

255-
<varlistentry>
256-
<term><option>-N</></term>
257-
<term><option>-&minus;unencrypted</></term>
258-
<listitem>
259-
<para>
260-
Does not encrypt the user's password stored in the database. If
261-
not specified, the default password behavior is used.
262-
</para>
263-
</listitem>
264-
</varlistentry>
265-
266255
<varlistentry>
267256
<term><option>-P</></term>
268257
<term><option>-&minus;pwprompt</></term>
@@ -421,7 +410,7 @@ ____________________________________________________________________________-->
421410
<term><option>--encrypted</></term>
422411
<listitem>
423412
<para>
424-
加密存储在数据库中的用户口令。如果没有指定,默认的口令行为将被使用
413+
此选项已过时,但为了实现向后兼容仍然接受
425414
</para>
426415
</listitem>
427416
</varlistentry>
@@ -490,16 +479,6 @@ ____________________________________________________________________________-->
490479
</listitem>
491480
</varlistentry>
492481

493-
<varlistentry>
494-
<term><option>-N</></term>
495-
<term><option>--unencrypted</></term>
496-
<listitem>
497-
<para>
498-
不对存储在数据库中的用户口令加密。如果没有指定,默认的口令行为将被使用。
499-
</para>
500-
</listitem>
501-
</varlistentry>
502-
503482
<varlistentry>
504483
<term><option>-P</></term>
505484
<term><option>--pwprompt</></term>
@@ -880,11 +859,7 @@ ____________________________________________________________________________-->
880859
</screen>
881860
In the above example, the new password isn't actually echoed when typed,
882861
but we show what was typed for clarity. As you see, the password is
883-
encrypted before it is sent to the client. If the option <option>-&minus;unencrypted</option>
884-
is used, the password <emphasis>will</> appear in the echoed command
885-
(and possibly also in the server log and elsewhere),
886-
so you don't want to use <option>-e</> in that case, if
887-
anyone else can see your screen.
862+
encrypted before it is sent to the client.
888863
</para>
889864
____________________________________________________________________________-->
890865
<para>
@@ -895,7 +870,7 @@ ____________________________________________________________________________-->
895870
<computeroutput>Enter it again: </computeroutput><userinput>xyzzy</userinput>
896871
<computeroutput>CREATE ROLE joe PASSWORD 'md5b5f5ba1a423792b526f799ae4eb3d59e' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;</computeroutput>
897872
</screen>
898-
在上面的例子中,在录入新口令时新口令并没有真正地被回显,但是为了清晰,我们特意把它列了出来。如你所见,该口令在被发送给客户端之前会被加密。如果使用了选项<option>--unencrypted</option>,口令<emphasis>将会</>出现在回显的命令中(并且还可能出现在服务器日志和其他地方)。因此如果任何他人能够看到你的屏幕,你不会希望使用<option>-e</>。
873+
在上面的例子中,在录入新口令时新口令并没有真正地被回显,但是为了清晰,我们特意把它列了出来。如你所见,该口令在被发送给客户端之前会被加密。
899874
</para>
900875
</refsect1>
901876

postgresql/doc/src/sgml/ref/delete.sgml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,12 @@ ____________________________________________________________________________-->
7979
<tip>
8080
<!--==========================orignal english content==========================
8181
<para>
82-
<xref linkend="sql-truncate"> is a
83-
<productname>PostgreSQL</productname> extension that provides a
82+
<xref linkend="sql-truncate"> provides a
8483
faster mechanism to remove all rows from a table.
8584
</para>
8685
____________________________________________________________________________-->
8786
<para>
88-
<xref linkend="sql-truncate">是一种提供移除表中所有行的快速机制的
89-
<productname>PostgreSQL</productname>扩展。
87+
<xref linkend="sql-truncate">提供移除表中所有行的快速机制。
9088
</para>
9189
</tip>
9290

@@ -530,4 +528,15 @@ ____________________________________________________________________________-->
530528
<command>DELETE</>中使用<literal>WITH</>也是扩展。
531529
</para>
532530
</refsect1>
533-
</refentry>
531+
532+
<refsect1>
533+
<!--==========================orignal english content==========================
534+
<title>See Also</title>
535+
____________________________________________________________________________-->
536+
<title>又见</title>
537+
538+
<simplelist type="inline">
539+
<member><xref linkend="sql-truncate"></member>
540+
</simplelist>
541+
</refsect1>
542+
</refentry>

postgresql/doc/src/sgml/ref/drop_aggregate.sgml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ____________________________________________________________________________-->
4040
<refsynopsisdiv>
4141
<!--==========================orignal english content==========================
4242
<synopsis>
43-
DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggregate_signature</replaceable> ) [ CASCADE | RESTRICT ]
43+
DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggregate_signature</replaceable> ) [, ...] [ CASCADE | RESTRICT ]
4444

4545
<phrase>where <replaceable>aggregate_signature</replaceable> is:</phrase>
4646

@@ -50,7 +50,7 @@ DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggr
5050
</synopsis>
5151
____________________________________________________________________________-->
5252
<synopsis>
53-
DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggregate_signature</replaceable> ) [ CASCADE | RESTRICT ]
53+
DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggregate_signature</replaceable> ) [, ...] [ CASCADE | RESTRICT ]
5454

5555
<phrase>这里<replaceable>aggregate_signature</replaceable>是:</phrase>
5656

@@ -285,7 +285,20 @@ ____________________________________________________________________________-->
285285
DROP AGGREGATE myrank(VARIADIC "any" ORDER BY VARIADIC "any");
286286
</programlisting>
287287
</para>
288-
</refsect1>
288+
289+
<!--==========================orignal english content==========================
290+
<para>
291+
To remove multiple aggregate functions in one command:
292+
<programlisting>
293+
DROP AGGREGATE myavg(integer), myavg(bigint);
294+
</programlisting></para>
295+
____________________________________________________________________________-->
296+
<para>
297+
要在一个命令中删除多个聚合函数:
298+
<programlisting>
299+
DROP AGGREGATE myavg(integer), myavg(bigint);
300+
</programlisting></para>
301+
</refsect1>
289302

290303
<refsect1>
291304
<!--==========================orignal english content==========================

postgresql/doc/src/sgml/ref/drop_foreign_data_wrapper.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ ____________________________________________________________________________-->
4040
<refsynopsisdiv>
4141
<!--==========================orignal english content==========================
4242
<synopsis>
43-
DROP FOREIGN DATA WRAPPER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ CASCADE | RESTRICT ]
43+
DROP FOREIGN DATA WRAPPER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
4444
</synopsis>
4545
____________________________________________________________________________-->
4646
<synopsis>
47-
DROP FOREIGN DATA WRAPPER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ CASCADE | RESTRICT ]
47+
DROP FOREIGN DATA WRAPPER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
4848
</synopsis>
4949
</refsynopsisdiv>
5050

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- doc/src/sggml/ref/drop_foreign_table.sgml -->
1+
<!-- doc/src/sgml/ref/drop_foreign_table.sgml -->
22

33
<refentry id="SQL-DROPFOREIGNTABLE">
44
<!--==========================orignal english content==========================

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

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ ____________________________________________________________________________-->
4040
<refsynopsisdiv>
4141
<!--==========================orignal english content==========================
4242
<synopsis>
43-
DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] )
43+
DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ] [, ...]
4444
[ CASCADE | RESTRICT ]
4545
</synopsis>
4646
____________________________________________________________________________-->
4747
<synopsis>
48-
DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] )
48+
DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ] [, ...]
4949
[ CASCADE | RESTRICT ]
5050
</synopsis>
5151
</refsynopsisdiv>
@@ -106,11 +106,13 @@ ____________________________________________________________________________-->
106106
<listitem>
107107
<!--==========================orignal english content==========================
108108
<para>
109-
The name (optionally schema-qualified) of an existing function.
109+
The name (optionally schema-qualified) of an existing function. If no
110+
argument list is specified, the name must be unique in its schema.
110111
</para>
111112
____________________________________________________________________________-->
112113
<para>
113114
一个现有函数的名称(可以是模式限定的)。
115+
如果未指定参数列表,则该名称在其模式中必须是唯一的。
114116
</para>
115117
</listitem>
116118
</varlistentry>
@@ -249,6 +251,48 @@ ____________________________________________________________________________-->
249251
<programlisting>
250252
DROP FUNCTION sqrt(integer);
251253
</programlisting></para>
254+
255+
<!--==========================orignal english content==========================
256+
<para>
257+
Drop multiple functions in one command:
258+
<programlisting>
259+
DROP FUNCTION sqrt(integer), sqrt(bigint);
260+
</programlisting></para>
261+
____________________________________________________________________________-->
262+
<para>
263+
在一个命令中删除多个函数:
264+
<programlisting>
265+
DROP FUNCTION sqrt(integer), sqrt(bigint);
266+
</programlisting></para>
267+
268+
<!--==========================orignal english content==========================
269+
<para>
270+
If the function name is unique in its schema, it can be referred to without
271+
an argument list:
272+
<programlisting>
273+
DROP FUNCTION update_employee_salaries;
274+
</programlisting>
275+
Note that this is different from
276+
<programlisting>
277+
DROP FUNCTION update_employee_salaries();
278+
</programlisting>
279+
which refers to a function with zero arguments, whereas the first variant
280+
can refer to a function with any number of arguments, including zero, as
281+
long as the name is unique.
282+
</para>
283+
____________________________________________________________________________-->
284+
<para>
285+
如果函数名称在其模式中是唯一的,则可以在不带参数列表的情况下引用它:
286+
<programlisting>
287+
DROP FUNCTION update_employee_salaries;
288+
</programlisting>
289+
请注意,这与
290+
<programlisting>
291+
DROP FUNCTION update_employee_salaries();
292+
</programlisting>
293+
不同,后者引用一个零个参数的函数,而第一个变体才可以引用具有任意数量参数的函数,
294+
包括零,只要该名称是唯一的。
295+
</para>
252296
</refsect1>
253297

254298
<refsect1 id="SQL-DROPFUNCTION-compatibility">
@@ -259,14 +303,34 @@ ____________________________________________________________________________-->
259303

260304
<!--==========================orignal english content==========================
261305
<para>
262-
A <command>DROP FUNCTION</command> statement is defined in the SQL
263-
standard, but it is not compatible with this command.
306+
This command conforms to the SQL standard, with
307+
these <productname>PostgreSQL</productname> extensions:
308+
<itemizedlist>
309+
<listitem>
310+
<para>The standard only allows one function to be dropped per command.</para>
311+
</listitem>
312+
<listitem>
313+
<para>The <literal>IF EXISTS</literal> option</para>
314+
</listitem>
315+
<listitem>
316+
<para>The ability to specify argument modes and names</para>
317+
</listitem>
318+
</itemizedlist>
264319
</para>
265320
____________________________________________________________________________-->
266321
<para>
267-
SQL 标准中定义了一个
268-
<command>DROP FUNCTION</command>语句,
269-
但是它与这个命令不兼容。
322+
该命令符合SQL标准,使用这些<productname>PostgreSQL</productname>扩展:
323+
<itemizedlist>
324+
<listitem>
325+
<para>该标准只允许每个命令删除一个函数。</para>
326+
</listitem>
327+
<listitem>
328+
<para><literal>IF EXISTS</literal>选项</para>
329+
</listitem>
330+
<listitem>
331+
<para>能够指定参数模式和名称</para>
332+
</listitem>
333+
</itemizedlist>
270334
</para>
271335
</refsect1>
272336

postgresql/doc/src/sgml/ref/drop_language.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ ____________________________________________________________________________-->
219219
<simplelist type="inline">
220220
<member><xref linkend="sql-alterlanguage"></member>
221221
<member><xref linkend="sql-createlanguage"></member>
222-
<member><xref linkend="app-droplang"></member>
223222
</simplelist>
224223
</refsect1>
225224

postgresql/doc/src/sgml/ref/drop_operator.sgml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ ____________________________________________________________________________-->
4040
<refsynopsisdiv>
4141
<!--==========================orignal english content==========================
4242
<synopsis>
43-
DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">left_type</replaceable> | NONE } , { <replaceable class="PARAMETER">right_type</replaceable> | NONE } ) [ CASCADE | RESTRICT ]
43+
DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">left_type</replaceable> | NONE } , { <replaceable class="PARAMETER">right_type</replaceable> | NONE } ) [, ...] [ CASCADE | RESTRICT ]
4444
</synopsis>
4545
____________________________________________________________________________-->
4646
<synopsis>
47-
DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">left_type</replaceable> | NONE } , { <replaceable class="PARAMETER">right_type</replaceable> | NONE } ) [ CASCADE | RESTRICT ]
47+
DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">left_type</replaceable> | NONE } , { <replaceable class="PARAMETER">right_type</replaceable> | NONE } ) [, ...] [ CASCADE | RESTRICT ]
4848
</synopsis>
4949
</refsynopsisdiv>
5050

@@ -240,6 +240,19 @@ ____________________________________________________________________________-->
240240
<literal>x!</literal>:
241241
<programlisting>
242242
DROP OPERATOR ! (bigint, none);
243+
</programlisting></para>
244+
245+
<!--==========================orignal english content==========================
246+
<para>
247+
Remove multiple operators in one command:
248+
<programlisting>
249+
DROP OPERATOR ~ (none, bit), ! (bigint, none);
250+
</programlisting></para>
251+
____________________________________________________________________________-->
252+
<para>
253+
在一条命令中删除多个操作符:
254+
<programlisting>
255+
DROP OPERATOR ~ (none, bit), ! (bigint, none);
243256
</programlisting></para>
244257
</refsect1>
245258

postgresql/doc/src/sgml/ref/drop_policy.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,14 @@ ____________________________________________________________________________-->
173173

174174
<programlisting>
175175
DROP POLICY p1 ON my_table;
176-
</programlisting>
177-
</para>
176+
</programlisting></para>
178177
____________________________________________________________________________-->
179178
<para>
180179
要在名为<literal>my_table</literal>上删除策略<literal>p1</literal>:
181180

182181
<programlisting>
183182
DROP POLICY p1 ON my_table;
184-
</programlisting>
185-
</para>
183+
</programlisting></para>
186184
</refsect1>
187185

188186
<refsect1>

0 commit comments

Comments
 (0)