<xref linkend="func_uuid_gen_table"/> shows the <productname>PostgreSQL</productname> functions that can be used to generate UUIDs. 《機械翻訳》表 9.45は、UUIDの生成に使用できるPostgreSQL関数を示しています。
表9.45 UUID Generation Functions
Function 関数 Description 説明 Example(s) 例 |
---|
Generate a version 4 (random) UUID. 《機械翻訳》バージョン4(ランダム)のUUIDを作成します。
|
Generate a version 7 (time-ordered) UUID. The timestamp is computed using UNIX timestamp
with millisecond precision + sub-millisecond timestamp + random. The optional parameter
<parameter>shift</parameter> will shift the computed timestamp by the given <type>interval</type>.
《機械翻訳》バージョン7
|
The <xref linkend="uuid-ossp"/> module provides additional functions that implement other standard algorithms for generating UUIDs. 《マッチ度[95.419847]》uuid-osspモジュールはUUID生成のための他の標準アルゴリズムを実装した追加の関数を提供します。
<xref linkend="func_uuid_extract_table"/> shows the <productname>PostgreSQL</productname> functions that can be used to extract information from UUIDs. 《機械翻訳》表 9.46は、UUIDから情報を抽出するために使用できるPostgreSQL関数を示しています。
表9.46 UUID Extraction Functions
Function 関数 Description 説明 Example(s) 例 |
---|
Extracts a <type>timestamp with time zone</type> from UUID
version 1 and 7. For other versions, this function returns null. Note that
the extracted timestamp is not necessarily exactly equal to the time the
UUID was generated; this depends on the implementation that generated the
UUID.
《マッチ度[88.111888]》この関数はUUIDバージョン1から
|
Extracts the version from a UUID of the variant described by
<ulink url="https://datatracker.ietf.org/doc/html/rfc9562">RFC 9562</ulink>. For
other variants, this function returns null. For example, for a UUID
generated by <function>gen_random_uuid</function>, this function will
return 4.
《マッチ度[86.851211]》この関数は、RFC 4122に記述されている種類のUUIDからバージョンを抽出します。
他の種類については、この関数はNULLを返します。
例えば、
|
<productname>PostgreSQL</productname> also provides the usual comparison operators shown in <xref linkend="functions-comparison-op-table"/> for UUIDs. PostgreSQLは表 9.1で示すUUIDのための通常の比較演算子を提供しています。
See <xref linkend="datatype-uuid"/> for details on the data type
<type>uuid</type> in <productname>PostgreSQL</productname>.
《機械翻訳》データタイプUUID
については、PostgreSQL)の8.12を参照。