]> granicus.if.org Git - postgresql/commitdiff
Contrib module uuid-ossp for generating UUID values using the OSSP UUID
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 21 Apr 2007 17:26:18 +0000 (17:26 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 21 Apr 2007 17:26:18 +0000 (17:26 +0000)
library.  New configure option --with-ossp-uuid to activate.

12 files changed:
configure
configure.in
contrib/Makefile
contrib/README
contrib/uuid-ossp/Makefile [new file with mode: 0644]
contrib/uuid-ossp/README.uuid-ossp [new file with mode: 0644]
contrib/uuid-ossp/uninstall_uuid-ossp.sql [new file with mode: 0644]
contrib/uuid-ossp/uuid-ossp.c [new file with mode: 0644]
contrib/uuid-ossp/uuid-ossp.sql.in [new file with mode: 0644]
doc/src/sgml/datatype.sgml
doc/src/sgml/installation.sgml
src/Makefile.global.in

index 3af7d001dfc1790f243a41c3d2a72f1047faddda..bb47cc32ee6043d4c072499bf79f2de4b0414227 100755 (executable)
--- a/configure
+++ b/configure
@@ -314,7 +314,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl XML2_CONFIG with_libxml with_libxslt with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_ossp_uuid XML2_CONFIG with_libxml with_libxslt with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -895,6 +895,7 @@ Optional Packages:
   --with-openssl          build with OpenSSL support
   --without-readline      do not use GNU Readline nor BSD Libedit for editing
   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
+  --with-ossp-uuid        build with OSSP UUID library for UUID generation
   --with-libxml           build with XML support
   --with-libxslt           build with XSLT support
   --without-zlib          do not use Zlib
@@ -4241,6 +4242,39 @@ fi;
 
 
 
+#
+# OSSP UUID library
+#
+
+pgac_args="$pgac_args with_ossp_uuid"
+
+
+# Check whether --with-ossp-uuid or --without-ossp-uuid was given.
+if test "${with_ossp_uuid+set}" = set; then
+  withval="$with_ossp_uuid"
+
+  case $withval in
+    yes)
+      :
+      ;;
+    no)
+      :
+      ;;
+    *)
+      { { echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
+echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+  esac
+
+else
+  with_ossp_uuid=no
+
+fi;
+
+
+
+
 #
 # XML
 #
@@ -24589,6 +24623,7 @@ s,@with_pam@,$with_pam,;t t
 s,@with_ldap@,$with_ldap,;t t
 s,@with_bonjour@,$with_bonjour,;t t
 s,@with_openssl@,$with_openssl,;t t
+s,@with_ossp_uuid@,$with_ossp_uuid,;t t
 s,@XML2_CONFIG@,$XML2_CONFIG,;t t
 s,@with_libxml@,$with_libxml,;t t
 s,@with_libxslt@,$with_libxslt,;t t
index 43cf008ed8b61836cb092ff00ee37f926afd39f0..557f74f4bd6f028c5c1a14d70153162a77c28614 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.511 2007/04/15 12:48:23 adunstan Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.512 2007/04/21 17:26:17 petere Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -555,6 +555,13 @@ PGAC_ARG_BOOL(with, libedit-preferred, no,
               [  --with-libedit-preferred  prefer BSD Libedit over GNU Readline])
 
 
+#
+# OSSP UUID library
+#
+PGAC_ARG_BOOL(with, ossp-uuid, no, [  --with-ossp-uuid        build with OSSP UUID library for UUID generation])
+AC_SUBST(with_ossp_uuid)
+
+
 #
 # XML
 #
index 411bbec26cd7593457147061dcfe1825fae20bf1..9b2bdc54485b67a66007afac56d8b66fbf5775e2 100644 (file)
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/contrib/Makefile,v 1.74 2007/04/15 12:48:23 adunstan Exp $
+# $PostgreSQL: pgsql/contrib/Makefile,v 1.75 2007/04/21 17:26:17 petere Exp $
 
 subdir = contrib
 top_builddir = ..
@@ -37,6 +37,10 @@ ifeq ($(with_openssl),yes)
 WANTED_DIRS += sslinfo
 endif
 
+ifeq ($(with_ossp_uuid),yes)
+WANTED_DIRS += uuid-ossp
+endif
+
 ifeq ($(with_libxml),yes)
 ifeq ($(with_libxslt),yes)
 WANTED_DIRS += xml2
index d6067d44dce0fbdcdde21421563da871675bf828..7c5034d48cf5642d3ba7ffec7f26bb985c3a0b89 100644 (file)
@@ -133,6 +133,10 @@ tsearch2 -
        by Teodor Sigaev <teodor@sigaev.ru> and Oleg Bartunov
        <oleg@sai.msu.su>.
 
+uuid-ossp -
+       UUID generation functions
+       by Peter Eisentraut <peter_e@gmx.net>
+
 vacuumlo -
        Remove orphaned large objects
        by Peter T Mount <peter@retep.org.uk>
diff --git a/contrib/uuid-ossp/Makefile b/contrib/uuid-ossp/Makefile
new file mode 100644 (file)
index 0000000..76727a5
--- /dev/null
@@ -0,0 +1,19 @@
+# $PostgreSQL: pgsql/contrib/uuid-ossp/Makefile,v 1.1 2007/04/21 17:26:17 petere Exp $
+
+MODULE_big = uuid-ossp
+OBJS = uuid-ossp.o
+DATA_built = uuid-ossp.sql
+DATA = uninstall_uuid-ossp.sql
+DOCS = README.uuid-ossp
+
+SHLIB_LINK += -lossp-uuid
+
+ifdef USE_PGXS
+PGXS := $(shell pg_config --pgxs)
+include $(PGXS)
+else
+subdir = contrib/uuid-ossp
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
diff --git a/contrib/uuid-ossp/README.uuid-ossp b/contrib/uuid-ossp/README.uuid-ossp
new file mode 100644 (file)
index 0000000..53a3b72
--- /dev/null
@@ -0,0 +1,97 @@
+UUID Generation Functions
+=========================
+Peter Eisentraut <peter_e@gmx.net>
+
+This module provides functions to generate universally unique
+identifiers (UUIDs) using one of the several standard algorithms, as
+well as functions to produce certain special UUID constants.
+
+
+Installation
+------------
+
+The extra library required can be found at
+<http://www.ossp.org/pkg/lib/uuid/>.
+
+
+UUID Generation
+---------------
+
+The relevant standards ITU-T Rec. X.667, ISO/IEC 9834-8:2005, and RFC
+4122 specify four algorithms for generating UUIDs, identified by the
+version numbers 1, 3, 4, and 5.  (There is no version 2 algorithm.)
+Each of these algorithms could be suitable for a different set of
+applications.
+
+uuid_generate_v1()
+~~~~~~~~~~~~~~~~~~
+
+This function generates a version 1 UUID.  This involves the MAC
+address of the computer and a time stamp.  Note that UUIDs of this
+kind reveal the identity of the computer that created the identifier
+and the time at which it did so, which might make it unsuitable for
+certain security-sensitive applications.
+
+uuid_generate_v1mc()
+~~~~~~~~~~~~~~~~~~~~
+
+This function generates a version 1 UUID but uses a random multicast
+MAC address instead of the real MAC address of the computer.
+
+uuid_generate_v3(namespace uuid, name text)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This function generates a version 3 UUID in the given namespace using
+the specified input name.  The namespace should be one of the special
+constants produced by the uuid_ns_*() functions shown below.  (It
+should be any UUID in theory.)  The name is an identifier in the
+selected namespace.  For example:
+
+  uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org')
+
+The name parameter will be MD5-hashed, so the cleartext cannot be
+derived from the generated UUID.
+
+The generation of UUIDs by this method has no random or
+environment-dependent element and is therefore reproducible.
+
+uuid_generate_v4()
+~~~~~~~~~~~~~~~~~~
+
+This function generates a version 4 UUID, which is derived entirely
+from random numbers.
+
+uuid_generate_v5(namespace uuid, name text)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This function generates a version 5 UUID, which works like a version 3
+UUID except that SHA-1 is used as a hashing method.  Version 5 should
+be preferred over version 3 because SHA-1 is thought to be more secure
+than MD5.
+
+
+UUID Constants
+--------------
+
+  uuid_nil()
+
+A "nil" UUID constant, which does not occur as a real UUID.
+
+  uuid_ns_dns()
+
+Constant designating the DNS namespace for UUIDs.
+
+  uuid_ns_url()
+
+Constant designating the URL namespace for UUIDs.
+
+  uuid_ns_oid()
+
+Constant designating the ISO object identifier (OID) namespace for
+UUIDs.  (This pertains to ASN.1 OIDs, unrelated to the OIDs used in
+PostgreSQL.)
+
+  uuid_ns_x500()
+
+Constant designating the X.500 distinguished name (DN) namespace for
+UUIDs.
diff --git a/contrib/uuid-ossp/uninstall_uuid-ossp.sql b/contrib/uuid-ossp/uninstall_uuid-ossp.sql
new file mode 100644 (file)
index 0000000..30226e9
--- /dev/null
@@ -0,0 +1,15 @@
+/* $PostgreSQL: pgsql/contrib/uuid-ossp/uninstall_uuid-ossp.sql,v 1.1 2007/04/21 17:26:17 petere Exp $ */
+
+SET search_path = public;
+
+DROP FUNCTION uuid_nil();
+DROP FUNCTION uuid_ns_dns();
+DROP FUNCTION uuid_ns_url();
+DROP FUNCTION uuid_ns_oid();
+DROP FUNCTION uuid_ns_x500();
+
+DROP FUNCTION uuid_generate_v1();
+DROP FUNCTION uuid_generate_v1mc();
+DROP FUNCTION uuid_generate_v3(namespace uuid, name text);
+DROP FUNCTION uuid_generate_v4();
+DROP FUNCTION uuid_generate_v5(namespace uuid, name text);
diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c
new file mode 100644 (file)
index 0000000..3be2cd1
--- /dev/null
@@ -0,0 +1,198 @@
+/*-------------------------------------------------------------------------
+ *
+ * UUID generation functions using the OSSP UUID library
+ *
+ * Copyright (c) 2007 PostgreSQL Global Development Group
+ *
+ * $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.1 2007/04/21 17:26:17 petere Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres.h"
+#include "fmgr.h"
+#include "utils/builtins.h"
+#include "utils/uuid.h"
+
+#include <ossp/uuid.h>
+
+
+/* better both be 16 */
+#if (UUID_LEN != UUID_LEN_BIN)
+#error UUID length mismatch
+#endif
+
+
+PG_MODULE_MAGIC;
+
+
+Datum uuid_nil(PG_FUNCTION_ARGS);
+Datum uuid_ns_dns(PG_FUNCTION_ARGS);
+Datum uuid_ns_url(PG_FUNCTION_ARGS);
+Datum uuid_ns_oid(PG_FUNCTION_ARGS);
+Datum uuid_ns_x500(PG_FUNCTION_ARGS);
+
+Datum uuid_generate_v1(PG_FUNCTION_ARGS);
+Datum uuid_generate_v1mc(PG_FUNCTION_ARGS);
+Datum uuid_generate_v3(PG_FUNCTION_ARGS);
+Datum uuid_generate_v4(PG_FUNCTION_ARGS);
+Datum uuid_generate_v5(PG_FUNCTION_ARGS);
+
+
+PG_FUNCTION_INFO_V1(uuid_nil);
+PG_FUNCTION_INFO_V1(uuid_ns_dns);
+PG_FUNCTION_INFO_V1(uuid_ns_url);
+PG_FUNCTION_INFO_V1(uuid_ns_oid);
+PG_FUNCTION_INFO_V1(uuid_ns_x500);
+
+PG_FUNCTION_INFO_V1(uuid_generate_v1);
+PG_FUNCTION_INFO_V1(uuid_generate_v1mc);
+PG_FUNCTION_INFO_V1(uuid_generate_v3);
+PG_FUNCTION_INFO_V1(uuid_generate_v4);
+PG_FUNCTION_INFO_V1(uuid_generate_v5);
+
+
+static char *
+uuid_to_string(const uuid_t *uuid)
+{
+       char   *buf = palloc(UUID_LEN_STR + 1);
+       void   *ptr = buf;
+       size_t  len = UUID_LEN_STR + 1;
+
+       uuid_export(uuid, UUID_FMT_STR, &ptr, &len);
+
+       return buf;
+}
+
+
+static void
+string_to_uuid(const char *str, uuid_t *uuid)
+{
+       uuid_import(uuid, UUID_FMT_STR, str, UUID_LEN_STR + 1);
+}
+
+
+static Datum
+special_uuid_value(const char *name)
+{
+       uuid_t *uuid;
+       char   *str;
+
+       uuid_create(&uuid);
+       uuid_load(uuid, name);
+       str = uuid_to_string(uuid);
+       uuid_destroy(uuid);
+
+       return DirectFunctionCall1(uuid_in, CStringGetDatum(str));
+}
+
+
+Datum
+uuid_nil(PG_FUNCTION_ARGS)
+{
+       return special_uuid_value("nil");
+}
+
+
+Datum
+uuid_ns_dns(PG_FUNCTION_ARGS)
+{
+       return special_uuid_value("ns:DNS");
+}
+
+
+Datum
+uuid_ns_url(PG_FUNCTION_ARGS)
+{
+       return special_uuid_value("ns:URL");
+}
+
+
+Datum
+uuid_ns_oid(PG_FUNCTION_ARGS)
+{
+       return special_uuid_value("ns:OID");
+}
+
+
+Datum
+uuid_ns_x500(PG_FUNCTION_ARGS)
+{
+       return special_uuid_value("ns:X500");
+}
+
+
+static Datum
+uuid_generate_internal(int mode, const uuid_t *ns, const char *name)
+{
+       uuid_t *uuid;
+       char   *str;
+
+       uuid_create(&uuid);
+       uuid_make(uuid, mode, ns, name);
+       str = uuid_to_string(uuid);
+       uuid_destroy(uuid);
+
+       return DirectFunctionCall1(uuid_in, CStringGetDatum(str));
+}
+
+
+Datum
+uuid_generate_v1(PG_FUNCTION_ARGS)
+{
+       return uuid_generate_internal(UUID_MAKE_V1, NULL, NULL);
+}
+
+
+Datum
+uuid_generate_v1mc(PG_FUNCTION_ARGS)
+{
+       return uuid_generate_internal(UUID_MAKE_V1 | UUID_MAKE_MC, NULL, NULL);
+}
+
+
+static Datum
+uuid_generate_v35_internal(int mode, pg_uuid_t *ns, text *name)
+{
+       uuid_t     *ns_uuid;
+       Datum           result;
+
+       uuid_create(&ns_uuid);
+       string_to_uuid(DatumGetCString(DirectFunctionCall1(uuid_out, UUIDPGetDatum(ns))),
+                                  ns_uuid);
+
+       result = uuid_generate_internal(mode,
+                                                                       ns_uuid,
+                                                                       DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(name))));
+
+       uuid_destroy(ns_uuid);
+
+       return result;
+}
+
+
+Datum
+uuid_generate_v3(PG_FUNCTION_ARGS)
+{
+       pg_uuid_t  *ns = PG_GETARG_UUID_P(0);
+       text       *name = PG_GETARG_TEXT_P(1);
+
+       return uuid_generate_v35_internal(UUID_MAKE_V3, ns, name);
+}
+
+
+Datum
+uuid_generate_v4(PG_FUNCTION_ARGS)
+{
+       return uuid_generate_internal(UUID_MAKE_V4, NULL, NULL);
+}
+
+
+Datum
+uuid_generate_v5(PG_FUNCTION_ARGS)
+{
+       pg_uuid_t  *ns = PG_GETARG_UUID_P(0);
+       text       *name = PG_GETARG_TEXT_P(1);
+
+       return uuid_generate_v35_internal(UUID_MAKE_V5, ns, name);
+}
diff --git a/contrib/uuid-ossp/uuid-ossp.sql.in b/contrib/uuid-ossp/uuid-ossp.sql.in
new file mode 100644 (file)
index 0000000..5b0599d
--- /dev/null
@@ -0,0 +1,15 @@
+/* $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.sql.in,v 1.1 2007/04/21 17:26:17 petere Exp $ */
+
+SET search_path = public;
+
+CREATE FUNCTION uuid_nil()     RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_nil';
+CREATE FUNCTION uuid_ns_dns()  RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_dns';
+CREATE FUNCTION uuid_ns_url()  RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_url';
+CREATE FUNCTION uuid_ns_oid()  RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_oid';
+CREATE FUNCTION uuid_ns_x500() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_x500';
+
+CREATE FUNCTION uuid_generate_v1()   RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v1';
+CREATE FUNCTION uuid_generate_v1mc() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v1mc';
+CREATE FUNCTION uuid_generate_v3(namespace uuid, name text) RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v3';
+CREATE FUNCTION uuid_generate_v4()   RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v4';
+CREATE FUNCTION uuid_generate_v5(namespace uuid, name text) RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v5';
index cda0f50d94b749c0d5de6ad1029e0de387ebe2cd..2ffe07458690655efcd1491c16b1373d28656578 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.197 2007/04/20 21:51:46 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.198 2007/04/21 17:26:17 petere Exp $ -->
 
  <chapter id="datatype">
   <title id="datatype-title">Data Types</title>
@@ -3246,6 +3246,13 @@ a0eebc999c0b4ef8bb6d6bb9bd380a11
 </programlisting>
     Output is always in the standard form.
    </para>
+
+   <para>
+    To generate UUIDs, the contrib module <literal>uuid-ossp</literal>
+    provides functions that implement the standard algorithms.
+    Alternatively, UUIDs could be generated by client applications or
+    other libraries invoked through a server-side function.
+   </para>
   </sect1>
 
   <sect1 id="datatype-xml">
index b8474a0a87b0274a02bc69e9151d83265a2518c6..5d5188aa008aaa5fe59d2c6600d3ee02125a0956 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.287 2007/04/21 15:30:28 adunstan Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.288 2007/04/21 17:26:17 petere Exp $ -->
 
 <chapter id="installation">
  <title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -910,6 +910,19 @@ su - postgres
        </listitem>
       </varlistentry>
 
+      <varlistentry>
+       <term><option>--with-ossp-uuid</option></term>
+       <listitem>
+        <para>
+         Build with the <ulink
+         url="http://www.ossp.org/pkg/lib/uuid/">OSSP UUID
+         library</ulink>.  This is necessary for the contrib module
+         <literal>uuid-ossp</literal> which provides functions to
+         generate UUIDs.<indexterm><primary>UUID</primary></indexterm>
+        </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry>
        <term><option>--with-libxml</option></term>
        <listitem>
index 2266704922c3d7ba8c9a66c50cf7592e26f4d473..604d7bbc67faf4a8a856c223ae361eb9bd5b3d38 100644 (file)
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.235 2007/04/15 12:48:23 adunstan Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.236 2007/04/21 17:26:18 petere Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -152,6 +152,7 @@ with_perl   = @with_perl@
 with_python    = @with_python@
 with_tcl       = @with_tcl@
 with_openssl   = @with_openssl@
+with_ossp_uuid = @with_ossp_uuid@
 with_libxml    = @with_libxml@
 with_libxslt   = @with_libxslt@
 with_zlib      = @with_zlib@