Skip to content

Commit 95b3413

Browse files
authored
Merge pull request #404 from messon007/master
translate finished for: syntax.sgml, sources.sgml, typeconv.sgml, uuid-ossp.sgml, start.sgml, storage.sgml, textsearch.sgml
2 parents 5664e09 + 05ecdd0 commit 95b3413

File tree

7 files changed

+100
-61
lines changed

7 files changed

+100
-61
lines changed

postgresql/doc/src/sgml/sources.sgml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ ____________________________________________________________________________-->
187187
message text. In addition there are optional elements, the most
188188
common of which is an error identifier code that follows the SQL spec's
189189
SQLSTATE conventions.
190-
<function>ereport</function> itself is just a shell macro, that exists
190+
<function>ereport</function> itself is just a shell macro that exists
191191
mainly for the syntactic convenience of making message generation
192192
look like a single function call in the C source code. The only parameter
193193
accepted directly by <function>ereport</function> is the severity level.
@@ -414,6 +414,14 @@ ____________________________________________________________________________-->
414414
<function>errmsg</function>.
415415
</para>
416416
</listitem>
417+
<listitem>
418+
<para>
419+
<function>errhint_plural(const char *fmt_singular, const char *fmt_plural,
420+
unsigned long n, ...)</function> is like <function>errhint</function>, but with
421+
support for various plural forms of the message.
422+
For more information see <xref linkend="nls-guidelines"/>.
423+
</para>
424+
</listitem>
417425
<listitem>
418426
<para>
419427
<function>errcontext(const char *msg, ...)</function> is not normally called
@@ -574,6 +582,12 @@ ____________________________________________________________________________-->
574582
<function>errhint(const char *msg, ...)</function>提供一个可选的<quote>hint</quote>消息,它被用来提供关于如何修复该问题的建议。该消息字符串以和<function>errmsg</function>相同的方式处理。
575583
</para>
576584
</listitem>
585+
<listitem>
586+
<para>
587+
<function>errhint_plural(const char *fmt_singular, const char *fmt_plural,
588+
unsigned long n, ...)</function>与<function>errhint</function>相似,但是支持多种复数形式的消息。详见<xref linkend="nls-guidelines"/>。
589+
</para>
590+
</listitem>
577591
<listitem>
578592
<para>
579593
<function>errcontext(const char *msg, ...)</function>通常不会被直接从一个<function>ereport</function>消息站点调用,它被用在<literal>error_context_stack</literal>回调函数中来提供错误发生的上下文,例如一个 PL 函数中的当前位置。该消息字符串以和<function>errmsg</function>相同的方式处理。不同于其他辅助函数,在每次<function>ereport</function>调用中可以多次调用这个函数,这样提供的连续的字符串将被用单独的新行串接在一起。
@@ -1409,6 +1423,24 @@ ____________________________________________________________________________-->
14091423
</para>
14101424
</formalpara>
14111425

1426+
<formalpara>
1427+
<!--==========================orignal english content==========================
1428+
<title>Non-negative</title>
1429+
____________________________________________________________________________-->
1430+
<title>Non-negative</title>
1431+
<!--==========================orignal english content==========================
1432+
<para>
1433+
Avoid <quote>non-negative</quote> as it is ambiguous
1434+
about whether it accepts zero. It's better to use
1435+
<quote>greater than zero</quote> or
1436+
<quote>greater than or equal to zero</quote>.
1437+
</para>
1438+
____________________________________________________________________________-->
1439+
<para>
1440+
避免<quote>non-negative</quote>,因为它不能清楚表达是否接受0。最好使用<quote>greater than zero</quote>或<quote>greater than or equal to zero</quote>。
1441+
</para>
1442+
</formalpara>
1443+
14121444
</simplesect>
14131445

14141446
<simplesect>

postgresql/doc/src/sgml/start.sgml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ ____________________________________________________________________________-->
174174
From that point on, the client and the new server process
175175
communicate without intervention by the original
176176
<filename>postgres</filename> process. Thus, the
177-
master server process is always running, waiting for
177+
supervisor server process is always running, waiting for
178178
client connections, whereas client and associated server processes
179179
come and go. (All of this is of course invisible to the user. We
180180
only mention it here for completeness.)
181181
</para>
182182
____________________________________________________________________________-->
183183
<para>
184-
<productname>PostgreSQL</productname>服务器可以处理来自客户端的多个并发请求。 因此,它为每个连接启动(<quote>forks</quote>)一个新的进程。 从这个时候开始,客户端和新服务器进程就不再经过最初的 <filename>postgres</filename>进程的干涉进行通讯。 因此,主服务器进程总是在运行并等待着客户端联接, 而客户端和相关联的服务器进程则是起起停停(当然,这些对用户是透明的。我们介绍这些主要是为了内容的完整性)。
184+
<productname>PostgreSQL</productname>服务器可以处理来自客户端的多个并发请求。 因此,它为每个连接启动(<quote>forks</quote>)一个新的进程。 从这个时候开始,客户端和新服务器进程就不再经过最初的 <filename>postgres</filename>进程的干涉进行通讯。 因此,守护者服务器进程总是在运行并等待着客户端联接, 而客户端和相关联的服务器进程则是起起停停(当然,这些对用户是透明的。我们介绍这些主要是为了内容的完整性)。
185185
</para>
186186
</sect1>
187187

@@ -289,30 +289,28 @@ createdb: command not found
289289
<para>
290290
Another response could be this:
291291
<screen>
292-
createdb: could not connect to database postgres: could not connect to server: No such file or directory
293-
Is the server running locally and accepting
294-
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
292+
createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
293+
Is the server running locally and accepting connections on that socket?
295294
</screen>
296-
This means that the server was not started, or it was not started
297-
where <command>createdb</command> expected it. Again, check the
295+
This means that the server was not started, or it is not listening
296+
where <command>createdb</command> expects to contact it. Again, check the
298297
installation instructions or consult the administrator.
299298
</para>
300299
____________________________________________________________________________-->
301300
<para>
302301
另外一种响应可能是这样:
303302
<screen>
304-
createdb: could not connect to database postgres: could not connect to server: No such file or directory
305-
Is the server running locally and accepting
306-
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
303+
createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
304+
Is the server running locally and accepting connections on that socket?
307305
</screen>
308-
这意味着该服务器没有启动,或者没有按照<command>createdb</command>预期地启动。同样, 你也要查看安装指导或者咨询管理员。
306+
这意味着该服务器没有启动,或者在<command>createdb</command>期望去连接它的时候没有在监听。同样, 你也要查看安装指导或者咨询管理员。
309307
</para>
310308

311309
<!--==========================orignal english content==========================
312310
<para>
313311
Another response could be this:
314312
<screen>
315-
createdb: could not connect to database postgres: FATAL: role "joe" does not exist
313+
createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: role "joe" does not exist
316314
</screen>
317315
where your own login name is mentioned. This will happen if the
318316
administrator has not created a <productname>PostgreSQL</productname> user account
@@ -331,7 +329,7 @@ ____________________________________________________________________________-->
331329
<para>
332330
另外一个响应可能是这样:
333331
<screen>
334-
createdb: could not connect to database postgres: FATAL: role "joe" does not exist
332+
createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: role "joe" does not exist
335333
</screen>
336334
在这里提到了你自己的登录名。如果管理员没有为你创建<productname>PostgreSQL</productname>用户帐号, 就会发生这些现象。(<productname>PostgreSQL</productname>用户帐号和操作系统用户帐号是不同的。) 如果你是管理员,参阅<xref linkend="user-manag"/>获取创建用户帐号的帮助。 你需要变成安装<productname>PostgreSQL</productname>的操作系统用户的身份(通常是 <literal>postgres</literal>)才能创建第一个用户帐号。 也有可能是赋予你的<productname>PostgreSQL</productname>用户名和你的操作系统用户名不同; 这种情况下,你需要使用<option>-U</option>选项或者使用<envar>PGUSER</envar>环境变量指定你的<productname>PostgreSQL</productname>用户名。
337335
</para>
@@ -341,7 +339,7 @@ createdb: could not connect to database postgres: FATAL: role "joe" does not ex
341339
If you have a user account but it does not have the privileges required to
342340
create a database, you will see the following:
343341
<screen>
344-
createdb: database creation failed: ERROR: permission denied to create database
342+
createdb: error: database creation failed: ERROR: permission denied to create database
345343
</screen>
346344
Not every user has authorization to create new databases. If
347345
<productname>PostgreSQL</productname> refuses to create databases
@@ -373,7 +371,7 @@ ____________________________________________________________________________-->
373371
<para>
374372
如果你有个数据库用户帐号,但是没有创建数据库所需要的权限,那么你会看到下面的信息:
375373
<screen>
376-
createdb: database creation failed: ERROR: permission denied to create database
374+
createdb: error: database creation failed: ERROR: permission denied to create database
377375
</screen>
378376
并非所有用户都被许可创建新数据库。 如果<productname>PostgreSQL</productname>拒绝为你创建数据库, 那么你需要让站点管理员赋予你创建数据库的权限。出现这种情况时请咨询你的站点管理员。 如果你自己安装了<productname>PostgreSQL</productname>, 那么你应该以你启动数据库服务器的用户身份登录然后参考手册完成权限的赋予工作。
379377

postgresql/doc/src/sgml/storage.sgml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,22 @@ ____________________________________________________________________________-->
647647
的内容将说明这个问题。
648648
</para>
649649

650+
<!--==========================orignal english content==========================
651+
<para>
652+
The compression technique used for either in-line or out-of-line compressed
653+
data can be selected for each column by setting
654+
the <literal>COMPRESSION</literal> column option in <command>CREATE
655+
TABLE</command> or <command>ALTER TABLE</command>. The default for columns
656+
with no explicit setting is to consult the
657+
<xref linkend="guc-default-toast-compression"/> parameter at the time data is
658+
inserted.
659+
</para>
660+
____________________________________________________________________________-->
661+
<para>
662+
线内或者线外压缩数据所使用的压缩技术可以在<command>CREATE TABLE</command>或<command>ALTER TABLE</command>时设置<literal>COMPRESSION</literal>列选项来为每一列选择。
663+
未显式设置的列的缺省值参照插入数据时的参数<xref linkend="guc-default-toast-compression"/>。
664+
</para>
665+
650666
<!--==========================orignal english content==========================
651667
<para>
652668
As mentioned, there are multiple types of <acronym>TOAST</acronym> pointer datums.
@@ -678,20 +694,6 @@ ____________________________________________________________________________-->
678694
<xref linkend="storage-toast-inmemory"/>。
679695
</para>
680696

681-
<!--==========================orignal english content==========================
682-
<para>
683-
The compression technique used for either in-line or out-of-line compressed
684-
data is a fairly simple and very fast member
685-
of the LZ family of compression techniques. See
686-
<filename>src/common/pg_lzcompress.c</filename> for the details.
687-
</para>
688-
____________________________________________________________________________-->
689-
<para>
690-
线内或者线外压缩数据所使用的压缩技术是 LZ 压缩技术家族中一种
691-
相对简单且非常快速的成员。详见
692-
<filename>src/common/pg_lzcompress.c</filename>。
693-
</para>
694-
695697
<sect2 id="storage-toast-ondisk">
696698
<!--==========================orignal english content==========================
697699
<title>Out-of-Line, On-Disk TOAST Storage</title>
@@ -727,14 +729,15 @@ retrieval of the values. A pointer datum representing an out-of-line on-disk
727729
<acronym>TOAST</acronym>ed value therefore needs to store the OID of the
728730
<acronym>TOAST</acronym> table in which to look and the OID of the specific value
729731
(its <structfield>chunk_id</structfield>). For convenience, pointer datums also store the
730-
logical datum size (original uncompressed data length) and physical stored size
731-
(different if compression was applied). Allowing for the varlena header bytes,
732+
logical datum size (original uncompressed data length), physical stored size
733+
(different if compression was applied), and the compression method used, if
734+
any. Allowing for the varlena header bytes,
732735
the total size of an on-disk <acronym>TOAST</acronym> pointer datum is therefore 18
733736
bytes regardless of the actual size of the represented value.
734737
</para>
735738
____________________________________________________________________________-->
736739
<para>
737-
线外值被分裂成(如果压缩过,在压缩之后分裂)最大为<symbol>TOAST_MAX_CHUNK_SIZE</symbol>(默认情况下该值应选为使得四个块(chunk)行能放在一个页面中,这个数值大约为2000 字节)字节的块。每个块都作为独立的行存储在从属于所属表的<acronym>TOAST</acronym>表中。每个<acronym>TOAST</acronym>表都有列<structfield>chunk_id</structfield>(一个表示特定的被<acronym>TOAST</acronym>过的数据的OID)、<structfield>chunk_seq</structfield>(一个序列号,存储该块在值中的位置)和一个<structfield>chunk_data</structfield>(该块的实际数据)。在<structfield>chunk_id</structfield>和<structfield>chunk_seq</structfield>上有一个唯一索引, 提供对值的快速检索。因此,一个表示线外磁盘上<acronym>TOAST</acronym>过的值的指针数据应存储要查看的<acronym>TOAST</acronym>表的OID以及 指定值的OID(它的<structfield>chunk_id</structfield>)。为了方便, 指针数据还存储逻辑数据的尺寸(原始的未压缩的数据长度)以及物理存储的尺寸(如果应用了压缩,则两者不同)。 加上变长数据头部的字节,一个磁盘上<acronym>TOAST</acronym>指针数据的总尺寸是18字节,不管它代表的值的实际长度是多大。
740+
线外值被分裂成(如果压缩过,在压缩之后分裂)最大为<symbol>TOAST_MAX_CHUNK_SIZE</symbol>(默认情况下该值应选为使得四个块(chunk)行能放在一个页面中,这个数值大约为2000 字节)字节的块。每个块都作为独立的行存储在从属于所属表的<acronym>TOAST</acronym>表中。每个<acronym>TOAST</acronym>表都有列<structfield>chunk_id</structfield>(一个表示特定的被<acronym>TOAST</acronym>过的数据的OID)、<structfield>chunk_seq</structfield>(一个序列号,存储该块在值中的位置)和一个<structfield>chunk_data</structfield>(该块的实际数据)。在<structfield>chunk_id</structfield>和<structfield>chunk_seq</structfield>上有一个唯一索引, 提供对值的快速检索。因此,一个表示线外磁盘上<acronym>TOAST</acronym>过的值的指针数据应存储要查看的<acronym>TOAST</acronym>表的OID以及 指定值的OID(它的<structfield>chunk_id</structfield>)。为了方便, 指针数据还存储逻辑数据的尺寸(原始的未压缩的数据长度),物理存储的尺寸(如果应用了压缩,则两者不同)以及采用的压缩方法(如果有的话)。 加上变长数据头部的字节,一个磁盘上<acronym>TOAST</acronym>指针数据的总尺寸是18字节,不管它代表的值的实际长度是多大。
738741
</para>
739742

740743
<!--==========================orignal english content==========================

0 commit comments

Comments
 (0)