Skip to content

Commit 0413dd9

Browse files
authored
Merge pull request #393 from sirlipeng/master
翻译14.1 2022/09/08 sirlipeng
2 parents 57b4fd2 + 35718d8 commit 0413dd9

Some content is hidden

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

43 files changed

+3017
-168
lines changed

postgresql/doc/src/sgml/docguide.sgml

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,17 @@ ____________________________________________________________________________-->
274274
You can get away with not installing DocBook XML and the DocBook XSLT
275275
stylesheets locally, because the required files will be downloaded from the
276276
Internet and cached locally. This may in fact be the preferred solution if
277-
your operating system packages provide only an old version of especially
278-
the stylesheets or if no packages are available at all. See
279-
the <option>-&minus;nonet</option> option for <command>xmllint</command>
280-
and <command>xsltproc</command> for more information.
277+
your operating system packages provide only an old version of these files,
278+
or if no packages are available at all.
279+
If you want to prevent any attempt to access the Internet while building
280+
the documentation, you need to pass the <option>-&minus;nonet</option> option
281+
to <command>xmllint</command> and <command>xsltproc</command>; see below
282+
for an example.
281283
</para>
282284
____________________________________________________________________________-->
283285
<para>
284-
你可以在本地不安装DocBook XML和DocBook XSLT样式表的情况下开始工作,因为所需的文件将从Internet下载下来并且缓存在本地。如果你的操作系统包仅提供了旧版本的样式表或者根本就没有所需的包,那么这种方式实际上是最好的解决方案。更多信息请见<command>xmllint</command>和<command>xsltproc</command>的<option>--nonet</option>选项。
286+
你可以在本地不安装DocBook XML和DocBook XSLT样式表的情况下开始工作,因为所需的文件将从Internet下载下来并且缓存在本地。如果你的操作系统包仅提供这些文件的旧版本,或者根本没有可用的包,则这实际上可能是首选解决方案。
287+
如果你想在构建文档时阻止任何访问Internet的尝试,你需要将<option>--nonet</option>选项传递给<command>xmllint</command>和<command>xsltproc</command>;参见下面的示例。
285288
</para>
286289

287290
<sect2>
@@ -412,31 +415,60 @@ ____________________________________________________________________________-->
412415
<!--==========================orignal english content==========================
413416
<para>
414417
Before you can build the documentation you need to run the
415-
<filename>configure</filename> script as you would when building
418+
<filename>configure</filename> script, as you would when building
416419
the <productname>PostgreSQL</productname> programs themselves.
417-
Check the output near the end of the run, it should look something
420+
Check the output near the end of the run; it should look something
418421
like this:
419422
<screen>
420423
checking for xmllint... xmllint
421-
checking for DocBook XML V4.5... yes
422-
checking for dbtoepub... dbtoepub
423424
checking for xsltproc... xsltproc
424425
checking for fop... fop
426+
checking for dbtoepub... dbtoepub
427+
</screen>
428+
If <filename>xmllint</filename> or <filename>xsltproc</filename> is not
429+
found, you will not be able to build any of the documentation.
430+
<filename>fop</filename> is only needed to build the documentation in
431+
PDF format.
432+
<filename>dbtoepub</filename> is only needed to build the documentation
433+
in EPUB format.
434+
</para>
435+
436+
<para>
437+
If necessary, you can tell <filename>configure</filename> where to find
438+
these programs, for example
439+
<screen>
440+
./configure ... XMLLINT=/opt/local/bin/xmllint ...
441+
</screen>
442+
Also, if you want to ensure that <filename>xmllint</filename>
443+
and <filename>xsltproc</filename> will not perform any network access,
444+
you can do something like
445+
<screen>
446+
./configure ... XMLLINT="xmllint -&minus;nonet" XSLTPROC="xsltproc -&minus;nonet" ...
425447
</screen>
426-
If <filename>xmllint</filename> was not found then some of the following
427-
tests will be skipped.
428448
</para>
429449
____________________________________________________________________________-->
430450
<para>
431-
在你能编译文档之前,你需要运行<filename>configure</filename>脚本,就像你在编译<productname>PostgreSQL</productname>程序本身时所作的那样。检查运行末尾附近的输出,应该看起来像这样
451+
在你能编译文档之前,你需要运行<filename>configure</filename>脚本,就像你在编译<productname>PostgreSQL</productname>程序本身时所作的那样。检查运行末尾附近的输出;它应该看起来像这样
432452
<screen>
433453
checking for xmllint... xmllint
434-
checking for DocBook XML V4.5... yes
435-
checking for dbtoepub... dbtoepub
436454
checking for xsltproc... xsltproc
437455
checking for fop... fop
456+
checking for dbtoepub... dbtoepub
457+
</screen>
458+
如果未找到<filename>xmllint</filename>或<filename>xsltproc</filename>,你将无法构建任何文档<filename>fop</filename>仅用于在中构建文档
459+
PDF格式。
460+
<filename>dbtoepub</filename>仅用于以EPUB格式构建文档。
461+
</para>
462+
463+
<para>
464+
如果需要,你可以告诉<filename>configure</filename>到哪里去找这些程序,例如
465+
<screen>
466+
./configure ... XMLLINT=/opt/local/bin/xmllint ...
467+
</screen>
468+
另外,如果你想确认<filename>xmllint</filename>和<filename>xsltproc</filename>不会执行任何网络访问,你可以如下操作
469+
<screen>
470+
./configure ... XMLLINT="xmllint --nonet" XSLTPROC="xsltproc --nonet" ...
438471
</screen>
439-
如果没有找到<filename>xmllint</filename>,那么一些后续测试将被跳过。
440472
</para>
441473

442474
</sect2>

postgresql/doc/src/sgml/ltree.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,7 @@ ltreetest=&gt; SELECT subpath(path,0,2)||'Space'||subpath(path,2) FROM test WHER
15831583

15841584
<!--==========================orignal english content==========================
15851585
<para>
1586-
We could simplify this by creating a SQL function that inserts a label
1586+
We could simplify this by creating an SQL function that inserts a label
15871587
at a specified position in a path:
15881588
<screen>
15891589
CREATE FUNCTION ins_label(ltree, int, text) RETURNS ltree

postgresql/doc/src/sgml/nls.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ msgstr "another translated"
133133

134134
...
135135
</programlisting>
136-
The msgid's are extracted from the program source. (They need not
136+
The msgid lines are extracted from the program source. (They need not
137137
be, but this is the most common way.) The msgstr lines are
138138
initially empty and are filled in with useful strings by the
139139
translator. The strings can contain C-style escape characters and
@@ -155,7 +155,7 @@ msgstr "another translated"
155155

156156
...
157157
</programlisting>
158-
msgid 被从程序源代码中抽取(不是必须这样做,但是这是最常用的方法)。msgstr 行最初是空的并且被翻译者用以填充有用的字符串。字符串可以包含 C 风格的转义字符并且可以跨越行(下一行必须开始于行首)。
158+
msgid行被从程序源代码中抽取(不是必须这样做,但是这是最常用的方法)。msgstr 行最初是空的并且被翻译者用以填充有用的字符串。字符串可以包含 C 风格的转义字符并且可以跨越行(下一行必须开始于行首)。
159159
</para>
160160

161161
<!--==========================orignal english content==========================
@@ -174,7 +174,7 @@ msgstr "another translated"
174174
The #. style comments are extracted from the source file where the
175175
message is used. Possibly the programmer has inserted information
176176
for the translator, such as about expected alignment. The #:
177-
comment indicates the exact location(s) where the message is used
177+
comments indicate the exact locations where the message is used
178178
in the source. The translator need not look at the program
179179
source, but can if there is doubt about the correct
180180
translation. The #, comments contain flags that describe the

postgresql/doc/src/sgml/passwordcheck.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ____________________________________________________________________________-->
4545
<para>
4646
You can adapt this module to your needs by changing the source code.
4747
For example, you can use
48-
<ulink url="https://sourceforge.net/projects/cracklib/">CrackLib</ulink>
48+
<ulink url="https://github.com/cracklib/cracklib">CrackLib</ulink>
4949
to check passwords &mdash; this only requires uncommenting
5050
two lines in the <filename>Makefile</filename> and rebuilding the
5151
module. (We cannot include <productname>CrackLib</productname>
@@ -56,7 +56,7 @@ ____________________________________________________________________________-->
5656
</para>
5757
____________________________________________________________________________-->
5858
<para>
59-
你可以通过修改源代码来按你的需要修改这个模块。例如,你可以使用<ulink url="https://sourceforge.net/projects/cracklib/">CrackLib</ulink>来检查口令 &mdash; 这只需要在<filename>Makefile</filename>中取消两行的注释并且重新编译该模块(由于授权原因,我们不能默认包括<productname>CrackLib</productname>)。如果没有<productname>CrackLib</productname>,该模块会对口令强度强制一些简单的规则,你可以自行修改和扩充。
59+
你可以通过修改源代码来按你的需要修改这个模块。例如,你可以使用<ulink url="https://github.com/cracklib/cracklib">CrackLib</ulink>来检查口令 &mdash; 这只需要在<filename>Makefile</filename>中取消两行的注释并且重新编译该模块(由于授权原因,我们不能默认包括<productname>CrackLib</productname>)。如果没有<productname>CrackLib</productname>,该模块会对口令强度强制一些简单的规则,你可以自行修改和扩充。
6060
</para>
6161

6262
<caution>

postgresql/doc/src/sgml/pgbuffercache.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ ____________________________________________________________________________-->
190190
</para>
191191
<para>
192192
Fork number within the relation; see
193-
<filename>include/common/relpath.h</filename>
193+
<filename>common/relpath.h</filename>
194194
</para></entry>
195195
</row>
196196
____________________________________________________________________________-->
@@ -199,7 +199,7 @@ ____________________________________________________________________________-->
199199
<structfield>relforknumber</structfield> <type>smallint</type>
200200
</para>
201201
<para>
202-
关系内的分叉数,见<filename>include/common/relpath.h</filename>
202+
关系内的分叉数,见<filename>common/relpath.h</filename>
203203
</para></entry>
204204
</row>
205205

postgresql/doc/src/sgml/pgfreespacemap.sgml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,6 @@ ____________________________________________________________________________-->
123123
<para>
124124
对于索引,被跟踪的是整个没有使用的页面,而不是页面中的空闲空间。因此,这些值可能没有意义,只是表示一个页面是满的还是空的。
125125
</para>
126-
127-
<note>
128-
<!--==========================orignal english content==========================
129-
<para>
130-
The interface was changed in version 8.4, to reflect the new FSM
131-
implementation introduced in the same version.
132-
</para>
133-
____________________________________________________________________________-->
134-
<para>
135-
在版本 8.4 中接口已被更改,以反映在同一个版本中新引入的 FSM 实现。
136-
</para>
137-
</note>
138126
</sect2>
139127

140128
<sect2>

postgresql/doc/src/sgml/pgrowlocks.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ ____________________________________________________________________________-->
192192
<listitem>
193193
<!--==========================orignal english content==========================
194194
<para>
195-
If the table as a whole is exclusive-locked by someone else,
196-
<function>pgrowlocks</function> will be blocked.
195+
If an <literal>ACCESS EXCLUSIVE</literal> lock is taken on the table,
196+
<function>pgrowlocks</function> will be blocked.
197197
</para>
198198
____________________________________________________________________________-->
199199
<para>
200-
如果表被其他人整体加上了排他锁,<function>pgrowlocks</function>将被阻塞。
200+
如果一个表上持有一个<literal>ACCESS EXCLUSIVE</literal>锁,<function>pgrowlocks</function>将被阻塞。
201201
</para>
202202
</listitem>
203203
<listitem>

postgresql/doc/src/sgml/plperl.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ ____________________________________________________________________________-->
2727
<!--==========================orignal english content==========================
2828
<para>
2929
PL/Perl is a loadable procedural language that enables you to write
30-
<productname>PostgreSQL</productname> functions in the
30+
<productname>PostgreSQL</productname> functions and procedures in the
3131
<ulink url="https://www.perl.org">Perl programming language</ulink>.
3232
</para>
3333
____________________________________________________________________________-->
3434
<para>
3535
PL/Perl 是一种可载入过程语言,它允许我们用
3636
<ulink url="https://www.perl.org">Perl 编程语言</ulink>编写
37-
<productname>PostgreSQL</productname>函数
37+
<productname>PostgreSQL</productname>函数和存储过程
3838
</para>
3939

4040
<!--==========================orignal english content==========================
4141
<para>
4242
The main advantage to using PL/Perl is that this allows use,
43-
within stored functions, of the manyfold <quote>string
43+
within stored functions and procedures, of the manyfold <quote>string
4444
munging</quote> operators and functions available for Perl. Parsing
4545
complex strings might be easier using Perl than it is with the
4646
string functions and control structures provided in PL/pgSQL.
4747
</para>
4848
____________________________________________________________________________-->
4949
<para>
50-
使用 PL/Perl 的主要优势它允许在存储函数中使用大量 Perl 的
50+
使用 PL/Perl 的主要优势它允许在存储函数和存储过程中使用大量 Perl 的
5151
<quote>串整理</quote>操作符和函数。使用 Perl 解析复杂
5252
串比使用 PL/pgSQL 中提供的串函数和控制结构要更容易。
5353
</para>

postgresql/doc/src/sgml/ref/close.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ ____________________________________________________________________________-->
157157
<productname>PostgreSQL</productname> does not have an explicit
158158
<command>OPEN</command> cursor statement; a cursor is considered
159159
open when it is declared. Use the
160-
<xref linkend="sql-declare"/>
160+
<link linkend="sql-declare"><command>DECLARE</command></link>
161161
statement to declare a cursor.
162162
</para>
163163
____________________________________________________________________________-->
164164
<para>
165165
<productname>PostgreSQL</productname>没有一个显式的
166166
<command>OPEN</command>游标语句,一个游标在被声明时
167-
就被认为是打开的。使用<xref linkend="sql-declare"/>语句可以声明游标。
167+
就被认为是打开的。使用<link linkend="sql-declare"><command>DECLARE</command></link>语句可以声明游标。
168168
</para>
169169

170170
<!--==========================orignal english content==========================

postgresql/doc/src/sgml/ref/create_aggregate.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ ____________________________________________________________________________-->
11601160
<para>
11611161
The meanings of <literal>PARALLEL SAFE</literal>, <literal>PARALLEL
11621162
RESTRICTED</literal>, and <literal>PARALLEL UNSAFE</literal> are the same as
1163-
in <xref linkend="sql-createfunction"/>. An aggregate will not be
1163+
in <link linkend="sql-createfunction"><command>CREATE FUNCTION</command></link>. An aggregate will not be
11641164
considered for parallelization if it is marked <literal>PARALLEL
11651165
UNSAFE</literal> (which is the default!) or <literal>PARALLEL RESTRICTED</literal>.
11661166
Note that the parallel-safety markings of the aggregate's support
@@ -1171,7 +1171,7 @@ ____________________________________________________________________________-->
11711171
<para>
11721172
<literal>PARALLEL SAFE</literal>、<literal>PARALLEL
11731173
RESTRICTED</literal>和<literal>PARALLEL UNSAFE</literal>的含义和
1174-
<xref linkend="sql-createfunction"/>中的相同。如果一个聚集被标记为
1174+
<link linkend="sql-createfunction"><command>CREATE FUNCTION</command></link>中的相同。如果一个聚集被标记为
11751175
<literal>PARALLEL UNSAFE</literal>(默认)或者
11761176
<literal>PARALLEL RESTRICTED</literal>,将不会考虑将它并行化。注意
11771177
规划器不会参考聚集的支持函数的并行安全性标记,它只会考虑聚集本身

0 commit comments

Comments
 (0)