Skip to content

Commit e213122

Browse files
committed
翻译部分sgml
1 parent fdee061 commit e213122

File tree

10 files changed

+100
-58
lines changed

10 files changed

+100
-58
lines changed

postgresql/doc/src/sgml/btree-gin.sgml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ ____________________________________________________________________________-->
1717

1818
<!--==========================orignal english content==========================
1919
<para>
20-
<filename>btree_gin</> provides sample GIN operator classes that
20+
<filename>btree_gin</filename> provides sample GIN operator classes that
2121
implement B-tree equivalent behavior for the data types
22-
<type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>,
23-
<type>float8</>, <type>timestamp with time zone</>,
24-
<type>timestamp without time zone</>, <type>time with time zone</>,
25-
<type>time without time zone</>, <type>date</>, <type>interval</>,
26-
<type>oid</>, <type>money</>, <type>"char"</>,
27-
<type>varchar</>, <type>text</>, <type>bytea</>, <type>bit</>,
28-
<type>varbit</>, <type>macaddr</>, <type>macaddr8</>, <type>inet</>,
29-
<type>cidr</>, and all <type>enum</> types.
22+
<type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>,
23+
<type>float8</type>, <type>timestamp with time zone</type>,
24+
<type>timestamp without time zone</type>, <type>time with time zone</type>,
25+
<type>time without time zone</type>, <type>date</type>, <type>interval</type>,
26+
<type>oid</type>, <type>money</type>, <type>"char"</type>,
27+
<type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>,
28+
<type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>,
29+
<type>cidr</type>, <type>uuid</type>, <type>name</type>, <type>bool</type>,
30+
<type>bpchar</type>, and all <type>enum</type> types.
3031
</para>
3132
____________________________________________________________________________-->
3233
<para>
@@ -38,7 +39,8 @@ ____________________________________________________________________________-->
3839
<type>oid</type>、<type>money</type>、<type>"char"</type>、
3940
<type>varchar</type>、<type>text</type>、<type>bytea</type>、<type>bit</type>、
4041
<type>varbit</type>、<type>macaddr</type>、<type>macaddr8</type>、<type>inet</type>、
41-
<type>cidr</type>和所有<type>enum</type>类型实现 B 树等价行为的 GIN 操作符类例子。
42+
<type>cidr</type>、<type>uuid</type>、<type>name</type>、<type>bool</type>、
43+
<type>bpchar</type>和所有<type>enum</type>类型实现 B 树等价行为的 GIN 操作符类例子。
4244
</para>
4345

4446
<!--==========================orignal english content==========================

postgresql/doc/src/sgml/charset.sgml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2755,6 +2755,23 @@ ____________________________________________________________________________-->
27552755
<literal>UTF8</literal>
27562756
</entry>
27572757
</row>
2758+
<!--==========================orignal english content==========================
2759+
<row>
2760+
<entry><literal>EUC_JIS_2004</literal></entry>
2761+
<entry><emphasis>EUC_JIS_2004</emphasis>,
2762+
<literal>SHIFT_JIS_2004</literal>,
2763+
<literal>UTF8</literal>
2764+
</entry>
2765+
</row>
2766+
2767+
____________________________________________________________________________-->
2768+
<row>
2769+
<entry><literal>EUC_JIS_2004</literal></entry>
2770+
<entry><emphasis>EUC_JIS_2004</emphasis>,
2771+
<literal>SHIFT_JIS_2004</literal>,
2772+
<literal>UTF8</literal>
2773+
</entry>
2774+
</row>
27582775
<!--==========================orignal english content==========================
27592776
<row>
27602777
<entry><literal>EUC_KR</literal></entry>
@@ -2880,15 +2897,13 @@ ____________________________________________________________________________-->
28802897
<!--==========================orignal english content==========================
28812898
<row>
28822899
<entry><literal>JOHAB</literal></entry>
2883-
<entry><emphasis>JOHAB</emphasis>,
2884-
<literal>UTF8</literal>
2900+
<entry><emphasis>not supported as a server encoding</emphasis>
28852901
</entry>
28862902
</row>
28872903
____________________________________________________________________________-->
28882904
<row>
28892905
<entry><literal>JOHAB</literal></entry>
2890-
<entry><emphasis>JOHAB</emphasis>,
2891-
<literal>UTF8</literal>
2906+
<entry><emphasis>不支持作为服务端编码</emphasis>
28922907
</entry>
28932908
</row>
28942909
<!--==========================orignal english content==========================
@@ -3125,6 +3140,18 @@ ____________________________________________________________________________-->
31253140
<entry><emphasis>不支持作为一个服务器编码</emphasis>
31263141
</entry>
31273142
</row>
3143+
<!--==========================orignal english content==========================
3144+
<row>
3145+
<entry><literal>SHIFT_JIS_2004</literal></entry>
3146+
<entry><emphasis>not supported as a server encoding</emphasis>
3147+
</entry>
3148+
</row>
3149+
____________________________________________________________________________-->
3150+
<row>
3151+
<entry><literal>SHIFT_JIS_2004</literal></entry>
3152+
<entry><emphasis>不支持作为一个服务器编码</emphasis>
3153+
</entry>
3154+
</row>
31283155
<!--==========================orignal english content==========================
31293156
<row>
31303157
<entry><literal>SQL_ASCII</literal></entry>

postgresql/doc/src/sgml/citext.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ CREATE TABLE users (
134134
pass TEXT NOT NULL
135135
);
136136

137-
INSERT INTO users VALUES ( 'larry', md5(random()::text) );
138-
INSERT INTO users VALUES ( 'Tom', md5(random()::text) );
139-
INSERT INTO users VALUES ( 'Damian', md5(random()::text) );
140-
INSERT INTO users VALUES ( 'NEAL', md5(random()::text) );
141-
INSERT INTO users VALUES ( 'Bj&oslash;rn', md5(random()::text) );
137+
INSERT INTO users VALUES ( 'larry', sha256(random()::text::bytea) );
138+
INSERT INTO users VALUES ( 'Tom', sha256(random()::text::bytea) );
139+
INSERT INTO users VALUES ( 'Damian', sha256(random()::text::bytea) );
140+
INSERT INTO users VALUES ( 'NEAL', sha256(random()::text::bytea) );
141+
INSERT INTO users VALUES ( 'Bj&oslash;rn', sha256(random()::text::bytea) );
142142

143143
SELECT * FROM users WHERE nick = 'Larry';
144144
</programlisting>
@@ -157,11 +157,11 @@ CREATE TABLE users (
157157
pass TEXT NOT NULL
158158
);
159159

160-
INSERT INTO users VALUES ( 'larry', md5(random()::text) );
161-
INSERT INTO users VALUES ( 'Tom', md5(random()::text) );
162-
INSERT INTO users VALUES ( 'Damian', md5(random()::text) );
163-
INSERT INTO users VALUES ( 'NEAL', md5(random()::text) );
164-
INSERT INTO users VALUES ( 'Bj&oslash;rn', md5(random()::text) );
160+
INSERT INTO users VALUES ( 'larry', sha256(random()::text::bytea) );
161+
INSERT INTO users VALUES ( 'Tom', sha256(random()::text::bytea) );
162+
INSERT INTO users VALUES ( 'Damian', sha256(random()::text::bytea) );
163+
INSERT INTO users VALUES ( 'NEAL', sha256(random()::text::bytea) );
164+
INSERT INTO users VALUES ( 'Bj&oslash;rn', sha256(random()::text::bytea) );
165165

166166
SELECT * FROM users WHERE nick = 'Larry';
167167
</programlisting>

postgresql/doc/src/sgml/contrib-spi.sgml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ ____________________________________________________________________________-->
2020
<!--==========================orignal english content==========================
2121
<para>
2222
The <application>spi</> module provides several workable examples
23-
of using SPI and triggers. While these functions are of some value in
23+
of using the <link linkend="spi">Server Programming Interface</link>
24+
(<acronym>SPI</acronym>) and triggers. While these functions are of some value in
2425
their own right, they are even more useful as examples to modify for
2526
your own purposes. The functions are general enough to be used
2627
with any table, but you have to specify table and field names (as described
2728
below) while creating a trigger.
2829
</para>
2930
____________________________________________________________________________-->
3031
<para>
31-
<application>spi</application>模块提供了多个可工作的使用 SPI 和触发器的例子。尽管这些例子的价值只对它们自己合适,它们甚至更有助于作为例子来修改达到你自己的目的。这些函数足够普通,可以与任何表一起使用,但是在创建一个触发器时你必须指定表名和域名(如下所述) 。
32+
<application>spi</application>模块提供了多个可工作的使用 the <link linkend="spi">服务器编程接口</link>
33+
(<acronym>SPI</acronym>) 和触发器的例子。尽管这些例子的价值只对它们自己合适,它们甚至更有助于作为例子来修改达到你自己的目的。这些函数足够普通,可以与任何表一起使用,但是在创建一个触发器时你必须指定表名和域名(如下所述) 。
3234
</para>
3335

3436
<!--==========================orignal english content==========================

postgresql/doc/src/sgml/cube.sgml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,18 +375,23 @@ ____________________________________________________________________________-->
375375
<entry><literal>a ~&gt; n</></entry>
376376
<entry><type>float8</></entry>
377377
<entry>
378-
Get <replaceable>n</>-th coordinate in <quote>normalized</> cube
379-
representation, in which the coordinates have been rearranged into
380-
the form <quote>lower left &mdash; upper right</>; that is, the
381-
smaller endpoint along each dimension appears first.
378+
Get <replaceable>n</replaceable>-th coordinate of cube in following way:
379+
n = 2 * k - 1 means lower bound of <replaceable>k</replaceable>-th
380+
dimension, n = 2 * k means upper bound of
381+
<replaceable>k</replaceable>-th dimension. Negative
382+
<replaceable>n</replaceable> denotes the inverse value of the corresponding
383+
positive coordinate. This operator is designed for KNN-GiST support.
382384
</entry>
383385
</row>
384386
____________________________________________________________________________-->
385387
<row>
386388
<entry><literal>a ~&gt; n</literal></entry>
387389
<entry><type>float8</type></entry>
388390
<entry>
389-
在<quote>一般化</quote>立方体表达中得到第<replaceable>n</replaceable>个坐标, 在这种形式中坐标已经被重新整理成<quote>左下 &mdash; 右上</quote>的形式。也就是说每个维度上较小的端点会先出现。
391+
以下列方式获取多维数据集的第<replaceable>n</replaceable>个坐标:
392+
         n = 2 * k - 1表示第<replaceable>k</replaceable>维度的下限,
393+
         n = 2 * k表示第<replaceable>k</replaceable>维度的上限。
394+
         负的<replaceable>n</replaceable>表示相应正坐标的倒数值。此运算符专为KNN-GiST支持而设计。
390395
</entry>
391396
</row>
392397

postgresql/doc/src/sgml/custom-scan.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ ____________________________________________________________________________-->
6060
<para>
6161
A custom scan provider will typically add paths for a base relation by
6262
setting the following hook, which is called after the core code has
63-
generated what it believes to be the complete and correct set of access
64-
paths for the relation.
63+
generated all the access paths it can for the relation (except for
64+
Gather paths, which are made after this call so that they can use
65+
partial paths added by the hook):
6566
<programlisting>
6667
typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root,
6768
RelOptInfo *rel,
@@ -72,7 +73,8 @@ extern PGDLLIMPORT set_rel_pathlist_hook_type set_rel_pathlist_hook;
7273
</para>
7374
____________________________________________________________________________-->
7475
<para>
75-
一个自定义扫描提供者将通过设置下面的钩子函数来为基本关系增加路径,在核心代码已经为该关系产生了完全且正确的访问路径集后,这个钩子函数将被调用。
76+
一个自定义扫描提供者将通过设置下面的钩子函数来为基本关系增加路径,
77+
在核心代码已经为该关系产生了所有访问路径集后(除了在此调用之后生成的Gather路径,以便它们可以使用被钩子添加的部分路径),这个钩子函数将被调用。
7678
<programlisting>
7779
typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root,
7880
RelOptInfo *rel,

postgresql/doc/src/sgml/external-projects.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ ____________________________________________________________________________-->
114114
<entry>DBD::Pg</entry>
115115
<entry>Perl</entry>
116116
<entry>Perl DBI driver</entry>
117-
<entry><ulink url="http://search.cpan.org/dist/DBD-Pg/"></ulink></entry>
117+
<entry><ulink url="https://metacpan.org/release/DBD-Pg"></ulink></entry>
118118
</row>
119119
____________________________________________________________________________-->
120120
<row>
121121
<entry>DBD::Pg</entry>
122122
<entry>Perl</entry>
123123
<entry>Perl DBI 驱动</entry>
124-
<entry><ulink url="http://search.cpan.org/dist/DBD-Pg/"></ulink></entry>
124+
<entry><ulink url="https://metacpan.org/release/DBD-Pg"></ulink></entry>
125125
</row>
126126

127127
<!--==========================orignal english content==========================
@@ -143,14 +143,14 @@ ____________________________________________________________________________-->
143143
<row>
144144
<entry>libpqxx</entry>
145145
<entry>C++</entry>
146-
<entry>New-style C++ interface</entry>
146+
<entry>C++ interface</entry>
147147
<entry><ulink url="http://pqxx.org/"></ulink></entry>
148148
</row>
149149
____________________________________________________________________________-->
150150
<row>
151151
<entry>libpqxx</entry>
152152
<entry>C++</entry>
153-
<entry>新风格的 C++ 接口</entry>
153+
<entry>C++ 接口</entry>
154154
<entry><ulink url="http://pqxx.org/"></ulink></entry>
155155
</row>
156156

@@ -204,14 +204,14 @@ ____________________________________________________________________________-->
204204
<entry>pgtclng</entry>
205205
<entry>Tcl</entry>
206206
<entry></entry>
207-
<entry><ulink url="http://sourceforge.net/projects/pgtclng/"></ulink></entry>
207+
<entry><ulink url="https://sourceforge.net/projects/pgtclng/"></ulink></entry>
208208
</row>
209209
____________________________________________________________________________-->
210210
<row>
211211
<entry>pgtclng</entry>
212212
<entry>Tcl</entry>
213213
<entry></entry>
214-
<entry><ulink url="http://sourceforge.net/projects/pgtclng/"></ulink></entry>
214+
<entry><ulink url="https://sourceforge.net/projects/pgtclng/"></ulink></entry>
215215
</row>
216216

217217
<!--==========================orignal english content==========================
@@ -284,12 +284,12 @@ ____________________________________________________________________________-->
284284
<para>
285285
There are several administration tools available for
286286
<productname>PostgreSQL</>. The most popular is
287-
<application><ulink url="http://www.pgadmin.org/">pgAdmin III</ulink></>,
287+
<application><ulink url="https://www.pgadmin.org/">pgAdmin</ulink></application>,
288288
and there are several commercially available ones as well.
289289
</para>
290290
____________________________________________________________________________-->
291291
<para>
292-
有多个管理工具可用于<productname>PostgreSQL</productname>。最流行的是<application><ulink url="http://www.pgadmin.org/">pgAdmin III</ulink></application>,并且也有一些商业版的可用。
292+
有多个管理工具可用于<productname>PostgreSQL</productname>。最流行的是<application><ulink url="https://www.pgadmin.org/">pgAdmin</ulink></application>,并且也有一些商业版的可用。
293293
</para>
294294
</sect1>
295295

postgresql/doc/src/sgml/file-fdw.sgml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,20 @@ ____________________________________________________________________________-->
324324

325325
<!--==========================orignal english content==========================
326326
<para>
327-
Changing table-level options requires superuser privileges, for security
328-
reasons: only a superuser should be able to control which file is read
329-
or which program is run. In principle non-superusers could be allowed to
327+
Changing table-level options requires being a superuser or having the privileges
328+
of the default role <literal>pg_read_server_files</literal> (to use a filename) or
329+
the default role <literal>pg_execute_server_program</literal> (to use a program),
330+
for security reasons: only certain users should be able to control which file is
331+
read or which program is run. In principle regular users could be allowed to
330332
change the other options, but that's not supported at present.
331333
</para>
332334
____________________________________________________________________________-->
333335
<para>
334-
出于安全原因,改变表级别的选项要求超级用户特权:
335-
只有超级用户能够控制读取哪个文件或者运行哪个程序。
336-
原则上非超级用户可以被允许改变其它选项,但是当前还不支持这样做。
336+
出于安全原因,改变表级别的选项要求超级用户特权或
337+
具有默认角色<literal>pg_read_server_files</literal>(使用文件名)或
338+
默认角色<literal>pg_execute_server_program </literal>(使用程序)的权限:
339+
只有特定用户能够控制读取哪个文件或者运行哪个程序。
340+
原则上普通用户可以被允许改变其它选项,但是当前还不支持这样做。
337341
</para>
338342
<!--==========================orignal english content==========================
339343
<para>

postgresql/doc/src/sgml/fuzzystrmatch.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,15 @@ ____________________________________________________________________________-->
455455

456456
<!--==========================orignal english content==========================
457457
<screen>
458-
test=# select dmetaphone('gumbo');
458+
test=# SELECT dmetaphone('gumbo');
459459
dmetaphone
460460
-&minus;-&minus;-&minus;-&minus;-&minus;-&minus;
461461
KMP
462462
(1 row)
463463
</screen>
464464
____________________________________________________________________________-->
465465
<screen>
466-
test=# select dmetaphone('gumbo');
466+
test=# SELECT dmetaphone('gumbo');
467467
dmetaphone
468468
------------
469469
KMP

0 commit comments

Comments
 (0)