|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/uuid-ossp.sgml,v 1.3 2010/07/29 19:34:40 petere Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/uuid-ossp.sgml,v 1.4 2010/08/10 20:42:01 petere Exp $ --> |
2 | 2 |
|
3 | 3 | <sect1 id="uuid-ossp">
|
4 | 4 | <title>uuid-ossp</title>
|
|
22 | 22 | <title><literal>uuid-ossp</literal> Functions</title>
|
23 | 23 |
|
24 | 24 | <para>
|
| 25 | + <xref linkend="uuid-ossp-functions"> shows the functions available to |
| 26 | + generate UUIDs. |
25 | 27 | The relevant standards ITU-T Rec. X.667, ISO/IEC 9834-8:2005, and RFC
|
26 | 28 | 4122 specify four algorithms for generating UUIDs, identified by the
|
27 | 29 | version numbers 1, 3, 4, and 5. (There is no version 2 algorithm.)
|
28 | 30 | Each of these algorithms could be suitable for a different set of
|
29 | 31 | applications.
|
30 | 32 | </para>
|
31 | 33 |
|
32 |
| - <table> |
| 34 | + <table id="uuid-ossp-functions"> |
33 | 35 | <title>Functions for UUID Generation</title>
|
34 | 36 | <tgroup cols="2">
|
35 | 37 | <thead>
|
|
67 | 69 | This function generates a version 3 UUID in the given namespace using
|
68 | 70 | the specified input name. The namespace should be one of the special
|
69 | 71 | constants produced by the <function>uuid_ns_*()</> functions shown
|
70 |
| - below. (It could be any UUID in theory.) The name is an identifier |
| 72 | + in <xref linkend="uuid-ossp-constants">. (It could be any UUID in theory.) The name is an identifier |
71 | 73 | in the selected namespace.
|
72 | 74 | </para>
|
| 75 | + |
| 76 | + <para> |
| 77 | + For example: |
| 78 | + |
| 79 | +<programlisting> |
| 80 | +SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org'); |
| 81 | +</programlisting> |
| 82 | + |
| 83 | + The name parameter will be MD5-hashed, so the cleartext cannot be |
| 84 | + derived from the generated UUID. |
| 85 | + The generation of UUIDs by this method has no random or |
| 86 | + environment-dependent element and is therefore reproducible. |
| 87 | + </para> |
73 | 88 | </entry>
|
74 | 89 | </row>
|
75 | 90 | <row>
|
|
96 | 111 | </tgroup>
|
97 | 112 | </table>
|
98 | 113 |
|
99 |
| - <para> |
100 |
| - For example: |
101 |
| - |
102 |
| -<programlisting> |
103 |
| -SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org'); |
104 |
| -</programlisting> |
105 |
| - |
106 |
| - The name parameter will be MD5-hashed, so the cleartext cannot be |
107 |
| - derived from the generated UUID. |
108 |
| - The generation of UUIDs by this method has no random or |
109 |
| - environment-dependent element and is therefore reproducible. |
110 |
| - </para> |
111 |
| - |
112 |
| - <table> |
| 114 | + <table id="uuid-ossp-constants"> |
113 | 115 | <title>Functions Returning UUID Constants</title>
|
114 | 116 | <tgroup cols="2">
|
115 | 117 | <tbody>
|
|
0 commit comments