]> pd.if.org Git - uuid/blobdiff - postgres/README
Expanded the install directions slightly.
[uuid] / postgres / README
index c57e41086a3a31556ff12db274f9426e038f36f3..678e63cef759c9855a4ad469dade234e7425cecc 100644 (file)
@@ -30,16 +30,24 @@ Compiles with the usual postgres addon infrastructure.
 make
 make install
 
+The 'make install' step will need sufficient privileges to write
+to the Postgres extension directory, so 'sudo make install'
+might be needed.
+
+Installation can be done via the usual Postgres extension mechanism.
+create extension pduuid;
+
+The extension is re-locatable, so you can specify a schema if you
+like.
+
 Installation can be done manually with:
 
 psql -f uuid.sql
 psql -f uninstall-uuid.sql
 
-Or as a postgres extension:
-create extension pduuid;
-
 A pure postgres implementation is also supplied of just the generation
-functions in purepguuid.sql.
+functions in purepguuid.sql, though this is very inefficient, feature
+incomplete, and untested.  It's there if you need it though.
 
 Generation Functions:
 
@@ -59,7 +67,7 @@ returns a version 4 uuid.  This is a random uuid.  The odds of collision
 are vanishingly low and it is safe to use for regular production uuid
 generation.
 
-uuid_v3(uuid, text)
+uuid_v5(uuid, text)
 returns a version 5 uuid using the supplied namespace uuid and the
 given input string.  This is an sha1 based uuid.
 
@@ -111,6 +119,9 @@ network byte order for the subfields of a uuid, where applicable.
 Numeric: treats the UUID as a 128 bit number and converts it to a numeric.
 
 Bit(128) and bit varying: treats the uuid as a 128 bit vector.
+Casts to bit(n) where n is shorter than 128 will truncate
+the uuid.  Where n is longer than 128, the bit vector
+will be zero extended.
 
 Field extraction functions: