From b9203ee84953006547f4afd58f405874c87bf0dc Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:02:17 +0200 Subject: 3.1 --- shared/ossp_uuid/pgsql/uuid.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 shared/ossp_uuid/pgsql/uuid.txt (limited to 'shared/ossp_uuid/pgsql/uuid.txt') diff --git a/shared/ossp_uuid/pgsql/uuid.txt b/shared/ossp_uuid/pgsql/uuid.txt new file mode 100644 index 00000000..c9506de4 --- /dev/null +++ b/shared/ossp_uuid/pgsql/uuid.txt @@ -0,0 +1,36 @@ + + OSSP uuid bindings for PostgreSQL + ================================= + + This is the OSSP uuid binding for the PostgreSQL RDBMS, providing + native UUID data type support. + + Installation + ------------ + + In order to install the OSSP uuid binding into the PostgreSQL database + one has run: + + $ /bin/psql \ + -d \ + -U postgresql \ + -f /share/postgresql/uuid.sql + + Usage + ----- + + psql -d + psql> CREATE TABLE test (id UUID DEFAULT uuid(1), name TEXT); + psql> INSERT INTO test (name) VALUES + ('foo'); + psql> INSERT INTO test (id, name) VALUES + (uuid(1), 'bar'); + psql> INSERT INTO test (id, name) VALUES + (uuid(3, 'ns:URL', 'http://www.ossp.org/'), 'baz'); + psql> INSERT INTO test (id, name) VALUES + (uuid(3, '6ba7b811-9dad-11d1-80b4-00c04fd430c8', + 'http://www.ossp.org/'), 'quux'); + psql> SELECT uuid(4); + psql> SELECT * FROM test WHERE id = uuid(3, 'ns:URL', 'http://www.ossp.org/'); + psql> DROP TABLE test; + -- cgit