Skip to content

Commit d3aa84e

Browse files
committed
Merge pull request #82 from zuyue/master
uuid-ossp.sgml添加英文原文
2 parents 614d6dd + 3f69489 commit d3aa84e

File tree

1 file changed

+124
-9
lines changed

1 file changed

+124
-9
lines changed

postgresql/doc/src/sgml/uuid-ossp.sgml

Lines changed: 124 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,84 @@
77
<primary>uuid-ossp</primary>
88
</indexterm>
99

10+
<!--
11+
<para>
12+
The <filename>uuid-ossp</> module provides functions to generate universally
13+
unique identifiers (UUIDs) using one of several standard algorithms. There
14+
are also functions to produce certain special UUID constants.
15+
</para>
16+
-->
1017
<para>
1118
<filename>uuid-ossp</>模块提供了一些函数用来生成通用唯一识别码(UUID),
1219
它支持几种 UUID 产生的标准算法。同时它还提供了一些函数用来产生某些特定
1320
的UUID常量。
1421
</para>
1522

23+
<!--
24+
<para>
25+
This module depends on the OSSP UUID library, which can be found at
26+
<ulink url="http://www.ossp.org/pkg/lib/uuid/"></ulink>.
27+
</para>
28+
-->
1629
<para>
1730
这个模块依赖于 OSSP UUID 库,
1831
<ulink url="http://www.ossp.org/pkg/lib/uuid/"></ulink>.
1932
</para>
2033

2134
<sect2>
22-
<title><literal>uuid-ossp</literal> 函数</title>
35+
<!--
36+
<title><literal>uuid-ossp</literal> Functions</title>
37+
-->
38+
<title><literal>uuid-ossp</literal> 函数</title>
2339

40+
<!--
2441
<para>
42+
<xref linkend="uuid-ossp-functions"> shows the functions available to
43+
generate UUIDs.
44+
The relevant standards ITU-T Rec. X.667, ISO/IEC 9834-8:2005, and RFC
45+
4122 specify four algorithms for generating UUIDs, identified by the
46+
version numbers 1, 3, 4, and 5. (There is no version 2 algorithm.)
47+
Each of these algorithms could be suitable for a different set of
48+
applications.
49+
</para>
50+
-->
51+
<para>
2552
<xref linkend="uuid-ossp-functions"> 中的函数用来产生 UUID。
2653
相关标准 ITU-T Rec. X.667, ISO/IEC 9834-8:2005 和 RFC
2754
4122 定义了四种生成 UUID 的算法, 分别在版本
2855
1, 3, 4 和5中定义(没用版本2算法)每个算法适合于不同种类的应用使用。
2956
</para>
3057

3158
<table id="uuid-ossp-functions">
32-
<title>UUID 生成函数</title>
59+
<!--
60+
<title>Functions for UUID Generation</title>
61+
-->
62+
<title>UUID 生成函数</title>
3363
<tgroup cols="2">
3464
<thead>
3565
<row>
36-
<entry>函数</entry>
66+
<!--
67+
<entry>Function</entry>
68+
<entry>Description</entry>
69+
-->
70+
<entry>函数</entry>
3771
<entry>描述</entry>
3872
</row>
3973
</thead>
4074
<tbody>
4175
<row>
4276
<entry><function>uuid_generate_v1()</function><indexterm><primary>uuid_generate_v1</primary></indexterm></entry>
4377
<entry>
44-
<para>
78+
<!--
79+
<para>
80+
This function generates a version 1 UUID. This involves the MAC
81+
address of the computer and a time stamp. Note that UUIDs of this
82+
kind reveal the identity of the computer that created the identifier
83+
and the time at which it did so, which might make it unsuitable for
84+
certain security-sensitive applications.
85+
</para>
86+
-->
87+
<para>
4588
这个函数生成版本1的 UUID。它的算法使用了计算机的MAC地址和时间戳。注意这种
4689
UUID 泄露了生成它的计算机标识和生成它的时间,所以它可能不太适合对安全性要求较高的应用。
4790
</para>
@@ -50,7 +93,13 @@
5093
<row>
5194
<entry><function>uuid_generate_v1mc()</function><indexterm><primary>uuid_generate_v1mc</primary></indexterm></entry>
5295
<entry>
53-
<para>
96+
<!--
97+
<para>
98+
This function generates a version 1 UUID but uses a random multicast
99+
MAC address instead of the real MAC address of the computer.
100+
</para>
101+
-->
102+
<para>
54103
这个函数生成一个版本1的 UUID,但是使用一个随机多播 MAC
55104
地址而不是计算机的真实的 MAC 地址。
56105
</para>
@@ -59,7 +108,16 @@
59108
<row>
60109
<entry><function>uuid_generate_v3(namespace uuid, name text)</function><indexterm><primary>uuid_generate_v3</primary></indexterm></entry>
61110
<entry>
62-
<para>
111+
<!--
112+
<para>
113+
This function generates a version 3 UUID in the given namespace using
114+
the specified input name. The namespace should be one of the special
115+
constants produced by the <function>uuid_ns_*()</> functions shown
116+
in <xref linkend="uuid-ossp-constants">. (It could be any UUID in theory.) The name is an identifier
117+
in the selected namespace.
118+
</para>
119+
-->
120+
<para>
63121
这个函数使用给定的输入名字(name)在给定的命名空间(namespace)
64122
中生成一个版本3的 UUID。给定的命名空间应该是调用表
65123
<xref linkend="uuid-ossp-constants"> 中的函数
@@ -68,12 +126,21 @@
68126
</para>
69127

70128
<para>
129+
<!--
130+
For example:
131+
-->
71132
例如:
72133

73134
<programlisting>
74135
SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org');
75136
</programlisting>
76137

138+
<!--
139+
The name parameter will be MD5-hashed, so the cleartext cannot be
140+
derived from the generated UUID.
141+
The generation of UUIDs by this method has no random or
142+
environment-dependent element and is therefore reproducible.
143+
-->
77144
参数 name会被使用 MD5 算法做哈希,所以从产生的 UUID 中不可能反向获得明文。
78145
利用这个方法生成的 UUID 不需要随机算法不依赖任何运行相关的环境因素,因此生成过程是可重复的。
79146
</para>
@@ -82,15 +149,29 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org');
82149
<row>
83150
<entry><literal>uuid_generate_v4()</literal></entry>
84151
<entry>
152+
<!--
85153
<para>
154+
This function generates a version 4 UUID, which is derived entirely
155+
from random numbers.
156+
</para>
157+
-->
158+
<para>
86159
这个函数生成一个版本4的 UUID,它完全依靠随机数。
87160
</para>
88161
</entry>
89162
</row>
90163
<row>
91164
<entry><literal>uuid_generate_v5(namespace uuid, name text)</literal></entry>
92165
<entry>
166+
<!--
93167
<para>
168+
This function generates a version 5 UUID, which works like a version 3
169+
UUID except that SHA-1 is used as a hashing method. Version 5 should
170+
be preferred over version 3 because SHA-1 is thought to be more secure
171+
than MD5.
172+
</para>
173+
-->
174+
<para>
94175
这个函数生成一个版本5的 UUID,它个工作过程类似于版本3的
95176
UUID,但是它使用的 SHA-1 的哈希算法。因为 SHA-1 算法被认为比 MD5
96177
算法更安全,所有应该尽量使用版本 5 而不版本 3。
@@ -102,45 +183,76 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org');
102183
</table>
103184

104185
<table id="uuid-ossp-constants">
186+
<!--
187+
<title>Functions Returning UUID Constants</title>
188+
-->
105189
<title>返回 UUID 常量的函数</title>
106190
<tgroup cols="2">
107191
<tbody>
108192
<row>
109193
<entry><literal>uuid_nil()</literal></entry>
110194
<entry>
195+
<!--
111196
<para>
197+
A <quote>nil</> UUID constant, which does not occur as a real UUID.
198+
</para>
199+
-->
200+
<para>
112201
一个 <quote>nil</> UUID 常量, 它不应该看作一个真正的 UUID。
113202
</para>
114203
</entry>
115204
</row>
116205
<row>
117206
<entry><literal>uuid_ns_dns()</literal></entry>
118207
<entry>
208+
<!--
119209
<para>
210+
Constant designating the DNS namespace for UUIDs.
211+
</para>
212+
-->
213+
<para>
120214
代表 DNS 命令空间的 UUID 常量。
121215
</para>
122216
</entry>
123217
</row>
124218
<row>
125219
<entry><literal>uuid_ns_url()</literal></entry>
126220
<entry>
127-
<para>
221+
<!--
222+
<para>
223+
Constant designating the URL namespace for UUIDs.
224+
</para>
225+
-->
226+
<para>
128227
代表 URL 命名空间的 UUID 常量。
129228
</para>
130229
</entry>
131230
</row>
132231
<row>
133232
<entry><literal>uuid_ns_oid()</literal></entry>
134233
<entry>
234+
<!--
135235
<para>
236+
Constant designating the ISO object identifier (OID) namespace for
237+
UUIDs. (This pertains to ASN.1 OIDs, which are unrelated to the OIDs
238+
used in <productname>PostgreSQL</>.)
239+
</para>
240+
-->
241+
<para>
136242
代表 ISO 对象标识符(OID)命名空间的 UUID 常量。(它是 ASN.1 的 OID,和 <productname>PostgreSQL</> 用的 OID 没有关系)。
137243
</para>
138244
</entry>
139245
</row>
140246
<row>
141247
<entry><literal>uuid_ns_x500()</literal></entry>
142248
<entry>
143-
<para>
249+
<!--
250+
<para>
251+
Constant designating the X.500 distinguished name (DN) namespace for
252+
UUIDs.
253+
</para>
254+
-->
255+
<para>
144256
代表 X.500 识别名字(DN)命名空间的 UUID 常量
145257
</para>
146258
</entry>
@@ -151,7 +263,10 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org');
151263
</sect2>
152264

153265
<sect2>
154-
<title>作者</title>
266+
<!--
267+
<title>Author</title>
268+
-->
269+
<title>作者</title>
155270

156271
<para>
157272
Peter Eisentraut <email>peter_e@gmx.net</email>

0 commit comments

Comments
 (0)