uuid_extract_version ( uuid ) → smallintExtracts 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.uuid_extract_version('41db1265-8bc1-4ab3-992f-885799a4af1d'::uuid) → 4uuid_extract_version('019535d9-3df7-79fb-b466-fa907fa17f9e'::uuid) → 7