From c91c28b207db88e0fda2429b27f447773f1e24b7 Mon Sep 17 00:00:00 2001 From: Andrew Alsup Date: Fri, 21 Feb 2025 23:19:52 -0500 Subject: [PATCH] UUID datatype docs discuss different versions --- doc/src/sgml/datatype.sgml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 87679dc4a11..76a0bcc1bae 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -4399,12 +4399,21 @@ SELECT to_tsvector( 'postgraduate' ), to_tsquery( 'postgres:*' ); ISO/IEC 9834-8:2005, and related standards. (Some systems refer to this data type as a globally unique identifier, or GUID,GUID instead.) This - identifier is a 128-bit quantity that is generated by an algorithm chosen - to make it very unlikely that the same identifier will be generated by - anyone else in the known universe using the same algorithm. Therefore, - for distributed systems, these identifiers provide a better uniqueness - guarantee than sequence generators, which - are only unique within a single database. + identifier is a 128-bit quantity generated by an algorithm chosen to make it + extremely unlikely that the same identifier will be generated by any other system. + Therefore, for distributed systems, these identifiers offer better uniqueness + guarantees than sequence generators, which only guarantee uniqueness within a + single database. + + + + The UUID RFC defines 8 discrete UUID versions, which differ only in how the + UUID is generated -- each version provides distinct benefits and drawbacks. + PostgreSQL provides native support for generating UUIDs using the UUIDv4 and + UUIDv7 algorithms. Alternatively, UUID values can be generated outside of the + PostgreSQL database. In any case, PostgreSQL supports the uuid + datatype uniformly, regardless of the UUID version or whether it was generated + internally or externally. -- 2.39.5 (Apple Git-154)