This software package is an addon module for postgres. It supplies
-support functions for the built-in uuid data type. It was built and
-tested against postgres version 8.4.0. This file and all supplied files
+support functions for the built-in uuid data type. It was originally built and
+tested against postgres version 8.4.0. This file and all supplied files
are written by Nathan Wagner and placed in the public domain. Bug
reports to nw@hydaspes.if.org.
libtomcrypt by Tom St Denis, also in the public domain.
Functions supplied are uuid generation functions, conforming (with
-one exception) to RFC 4122. The exception lies in the multicast
-bit
+one exception) to RFC 4122 (see below for details).
Features:
-UUID generation functions for version 1, 3, 4, and 5 UUIDS.
+UUID generation functions for version 1, 3, 4, and 5 uuids.
RFC 4122 compliance, with the exception of the multicast bit
for randomly generated mac addresses. This module sets the correct
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
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:
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.
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: