{"Entry":{"collection":"func","key":"uuid-extract-version","name":"uuid_extract_version","aliases":[],"metadata":{"changed_in":["18"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"16","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"17"},{"descriptions_changed":true,"doc_overhaul":false,"from":"17","group_changed":null,"signatures":{"added":["uuid_extract_version ( uuid ) → smallint"],"removed":["uuid_extract_version (uuid) → smallint"]},"status":"changed","to":"18"}],"content_hash":"1d1b6b256cc9d0376ad02ebb60a450523c3b0b59779420591b4b9261c6136f6c","derived_content_hash":"2094f47fa17d58fa9b0c6e59a655489b3c546af8f8b9cd6dd37e4dad9e02808d","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:11f1b56854c5c3e63a96043f4d0c31456bd4364f648bcf579e4634ec98ef1518","versions":{"17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"17","group":"uuid","group_label":"Uuid Functions","groups":["uuid"],"imported_at":"2026-09-14T21:49:48.755323+08:00","last_version":"20","name":"uuid_extract_version","name_key":"uuid_extract_version","position":14002,"present_in":["17","18","19","20"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"26b84753d2dac3b5054b42988671b48204c870c56c3bff2da8d86cdab8f51fec","repair":"wiki-repair-20261023"},"signature":"uuid_extract_version ( uuid ) → smallint","signature_count":1,"slug":"uuid-extract-version","source_rev":"wiki-repair-20261023:11f1b56854c5c3e63a96043f4d0c31456bd4364f648bcf579e4634ec98ef1518","summary":"Extracts the version from a UUID of one of the variants described by RFC 9562.","summary_zh":""}},"Definition":{"Collection":"func","Key":"uuid-extract-version","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"uuid-extract-version","SourceRevision":"wiki-repair-20261023:11f1b56854c5c3e63a96043f4d0c31456bd4364f648bcf579e4634ec98ef1518","Facts":{"description":"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.","description_html":"Extracts the version from a UUID of one of the variants described by \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e. For other variants, this function returns null. For example, for a UUID generated by \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e, this function will return 4.","description_zh":"从符合 RFC 9562 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 gen_random_uuid() 生成的 UUID，该函数将返回 4。","description_zh_html":"从符合 \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e 生成的 UUID，该函数将返回 4。","doc":{"anchor":"FUNC_UUID_EXTRACT_TABLE","file":"functions-uuid.html","sha256":"1145bc769b573b2bdb5619ef98fc49d54db67f2fe7bd4bec69f14c025e66453c","slug":"18"},"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"},"group":"uuid","group_label":"UUID 函数","lang":"en","layout":"table-new","pages":["functions-uuid.html"],"prose_only":false,"signatures":[{"description":"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.","description_html":"Extracts the version from a UUID of one of the variants described by \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e. For other variants, this function returns null. For example, for a UUID generated by \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e, this function will return 4.","description_zh":"从符合 RFC 9562 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 gen_random_uuid() 生成的 UUID，该函数将返回 4。","description_zh_html":"从符合 \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e 生成的 UUID，该函数将返回 4。","examples":[{"expr":"uuid_extract_version('41db1265-8bc1-4ab3-992f-e85799a4af1d' :: uuid)","result":"4"},{"expr":"uuid_extract_version('019535d9-3df7-79fb-b466-fa907fa17f9e' :: uuid)","result":"7"}],"html":"\u003ccode class=\"function\"\u003euuid_extract_version\u003c/code\u003e ( \u003ccode class=\"type\"\u003euuid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003esmallint\u003c/code\u003e","returns":"smallint","text":"uuid_extract_version ( uuid ) → smallint","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-uuid.html","sha256":"151c63c49d5c4d62b5b90376ab82e5db7c6370a7daa7d58eb51c7b482156efdc"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNC_UUID_EXTRACT_TABLE","file":"functions-uuid.html","sha256":"1145bc769b573b2bdb5619ef98fc49d54db67f2fe7bd4bec69f14c025e66453c","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"uuid-extract-version","SourceDatabase":"center","Version":"18","Locale":"en","Title":"uuid_extract_version","Summary":"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.","BodyHTML":"Extracts the version from a UUID of one of the variants described by \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\" rel=\"nofollow\"\u003eRFC 9562\u003c/a\u003e. For other variants, this function returns null. For example, for a UUID generated by \u003ccode\u003egen_random_uuid()\u003c/code\u003e, this function will return 4.","SourceRevision":"wiki-repair-20261023:11f1b56854c5c3e63a96043f4d0c31456bd4364f648bcf579e4634ec98ef1518","ContentHash":"d2829ce0c63b86e8c018870f38380b67e92d204dccfab9947bd41520be3765ca","Payload":{"description":"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.","description_html":"Extracts the version from a UUID of one of the variants described by \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e. For other variants, this function returns null. For example, for a UUID generated by \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e, this function will return 4.","signatures":[{"description":"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.","description_html":"Extracts the version from a UUID of one of the variants described by \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e. For other variants, this function returns null. For example, for a UUID generated by \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e, this function will return 4.","description_zh":"从符合 RFC 9562 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 gen_random_uuid() 生成的 UUID，该函数将返回 4。","description_zh_html":"从符合 \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e 生成的 UUID，该函数将返回 4。","examples":[{"expr":"uuid_extract_version('41db1265-8bc1-4ab3-992f-e85799a4af1d' :: uuid)","result":"4"},{"expr":"uuid_extract_version('019535d9-3df7-79fb-b466-fa907fa17f9e' :: uuid)","result":"7"}],"html":"\u003ccode class=\"function\"\u003euuid_extract_version\u003c/code\u003e ( \u003ccode class=\"type\"\u003euuid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003esmallint\u003c/code\u003e","returns":"smallint","text":"uuid_extract_version ( uuid ) → smallint","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"4a9bec020107dbd888f8f3c6e43a5ab03956333c6ee9980cdce31bdb7915f3f6","Text":"uuid_extract_version ( uuid ) → smallint","Returns":"smallint","Payload":{"description":"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.","description_html":"Extracts the version from a UUID of one of the variants described by \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e. For other variants, this function returns null. For example, for a UUID generated by \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e, this function will return 4.","description_zh":"从符合 RFC 9562 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 gen_random_uuid() 生成的 UUID，该函数将返回 4。","description_zh_html":"从符合 \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9562\"\u003eRFC 9562\u003c/a\u003e 所描述某一变体的 UUID 中提取版本号。对于其他变体，该函数返回 null。例如，对于由 \u003ccode class=\"function\"\u003egen_random_uuid()\u003c/code\u003e 生成的 UUID，该函数将返回 4。","examples":[{"expr":"uuid_extract_version('41db1265-8bc1-4ab3-992f-e85799a4af1d' :: uuid)","result":"4"},{"expr":"uuid_extract_version('019535d9-3df7-79fb-b466-fa907fa17f9e' :: uuid)","result":"7"}],"html":"\u003ccode class=\"function\"\u003euuid_extract_version\u003c/code\u003e ( \u003ccode class=\"type\"\u003euuid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003esmallint\u003c/code\u003e","returns":"smallint","text":"uuid_extract_version ( uuid ) → smallint","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
