↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Functions

uuid_extract_version

Extracts the version from a UUID of one of the variants described by RFC 9562. For other variants, this function returns null. For example, for a UUID generated by gen_random_uuid(), this function will return 4.

English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

group
uuid
group label
UUID 函数
lang
en
layout
table-new
pages
functions-uuid.html
prose only
false

Definition PG 18

Extracts the version from a UUID of one of the variants described by RFC 9562. For other variants, this function returns null. For example, for a UUID generated by gen_random_uuid(), this function will return 4.

Signatures and overloads

uuid_extract_version ( uuid ) → smallint → smallint
Extracts the version from a UUID of one of the variants described by RFC 9562. For other variants, this function returns null. For example, for a UUID generated by gen_random_uuid(), this function will return 4.

Compare versions

Complete source facts

documentation revision

{"inputs":[{"file":"functions-uuid.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"1145bc769b573b2bdb5619ef98fc49d54db67f2fe7bd4bec69f14c025e66453c","version":"18.7"},{"file":"functions-uuid.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"59821fb93e96c7c39838320986580f60a79cc09b1cd2d8ab9bb738768941e05a","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:11f1b56854c5c3e63a96043f4d0c31456bd4364f648bcf579e4634ec98ef1518

Text language: en · wiki-repair-20261023:11f1b56854c5c3e63a96043f4d0c31456bd4364f648bcf579e4634ec98ef1518