Documentation for UUID type
authorPeter Eisentraut
Fri, 20 Apr 2007 21:51:46 +0000 (21:51 +0000)
committerPeter Eisentraut
Fri, 20 Apr 2007 21:51:46 +0000 (21:51 +0000)
doc/src/sgml/datatype.sgml

index d58156bd70e8b9e617533b2c729bd7e33f4e410e..cda0f50d94b749c0d5de6ad1029e0de387ebe2cd 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
   Data Types
        date and time, including time zone
       
 
+      
+       uuid
+       
+       universally unique identifier
+      
+
       
        xml
        
@@ -3199,6 +3205,49 @@ SELECT * FROM test;
    
   
 
+  
+   <acronym>UUID</acronym> Type
+
+   
+    UUID
+   
+
+   
+    The data type uuid stores Universally Unique
+    Identifiers (UUID) as per RFC 4122, ISO/IEC 9834-8:2005, and
+    related standards.  (Some systems refer to this data type as
+    globally unique
+    identifier/GUIDGUID
+    instead.)  Such an identifier is a 128-bit quantity that is
+    generated by a suitable algorithm so that it is very unlikely to
+    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 that which can be
+    achieved using sequence generators, which are only unique within a
+    single database.
+   
+
+   
+    A UUID is written as a sequence of lower-case hexadecimal digits,
+    in several groups separated by hyphens, specifically a group of 8
+    digits followed by three groups of 4 digits followed by a group of
+    12 digits, for a total of 32 digits representing the 128 bits.  An
+    example of a UUID in this standard form is:
+
+a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
+
+    PostgreSQL also accepts the following alternative forms for input:
+    use of upper-case digits, the standard format surrounded by
+    braces, and omitting the hyphens.  Examples are:
+
+A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11
+{a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11}
+a0eebc999c0b4ef8bb6d6bb9bd380a11
+
+    Output is always in the standard form.
+   
+  
+
   
    <acronym>XML</> Type