From: Tom Lane Date: Thu, 25 Sep 2025 15:23:27 +0000 (-0400) Subject: Doc: clean up documentation for new UUID functions. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cbfcb7b466052518e3ddcc784946aa1cfa3f3460;p=thirdparty%2Fpostgresql.git Doc: clean up documentation for new UUID functions. Fix assorted failures to conform to our normal style for function documentation, such as lack of parentheses and incorrect markup. Author: Marcos Pegoraro Co-authored-by: Tom Lane Discussion: https://postgr.es/m/CAB-JLwbocrFjKfGHoKY43pHTf49Ca2O0j3WVebC8z-eQBMPJyw@mail.gmail.com Backpatch-through: 18 --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 8a347bec62c..d2b6b01777e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -14419,8 +14419,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple - - + Function @@ -14428,24 +14427,22 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple Example(s) - - + - - - gen_random_uuid + + gen_random_uuid ( ) uuid - uuidv4 + uuidv4 ( ) uuid - Generate a version 4 (random) UUID. + Generates a version 4 (random) UUID gen_random_uuid() @@ -14454,26 +14451,25 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple uuidv4() b42410ee-132f-42ee-9e4f-09a6485c95b8 - - + - - - uuidv7 + + uuidv7 ( shift interval ) 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 - shift will shift the computed timestamp by the given interval. + Generates a version 7 (time-ordered) UUID. The timestamp is + computed using UNIX timestamp with millisecond precision + + sub-millisecond timestamp + random. The optional + parameter shift will shift the computed + timestamp by the given interval. uuidv7() 019535d9-3df7-79fb-b466-fa907fa17f9e - - + @@ -14496,8 +14492,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple - - + Function @@ -14505,44 +14500,41 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple Example(s) - - + - - - uuid_extract_timestamp + + uuid_extract_timestamp ( uuid ) timestamp with time zone - Extracts a timestamp with time zone 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. + Extracts a timestamp with time zone from a UUID of + version 1 or 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. uuid_extract_timestamp('019535d9-3df7-79fb-b466-&zwsp;fa907fa17f9e'::uuid) 2025-02-23 21:46:24.503-05 - - + - - - uuid_extract_version + + uuid_extract_version ( uuid ) smallint - Extracts the version from a UUID of the variant described by - RFC 9562. For - other variants, this function returns null. For example, for a UUID - generated by gen_random_uuid, this function will + 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. @@ -14552,8 +14544,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple uuid_extract_version('019535d9-3df7-79fb-b466-&zwsp;fa907fa17f9e'::uuid) 7 - - +