Patch for UUID datatype (beta)

From: Gevik Babakhani <pgdev(at)xs4all(dot)nl>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Patch for UUID datatype (beta)
Date: 2006-09-17 23:00:21
Message-ID: 1158534021.9228.9.camel@voyager.truesoftware.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Folks,

The following patch implements the UUID datatype. I would like to send
this beta patch to see if I still am on the right track. Please send
your comments.

Description of UUID:

- The type is called uuid.
- btree and hash indexes are supported.
- uuid array is supported.
- uuid text i/o is supported.
- uuid binary i/o is supported.
- uuid_to_text and text_to_uuid casting is supported.
- uuid_to_varchar and varchar_to_uuid casting is supported.
- the < <= = => > <> operators are supported. Please note that some of
these operators mathematically have no meaning and are only good for
sorting.

- new_guid() function is supported. This function is based on V4 random
uuid value. It generated 16 random bytes with uuid 'variant' and
'version'. It is not guaranteed to produce unique values according to
the docs but I have inserted 6 million records and it did not create any
duplicates :)

- the uuid datatype supports 3 input formats:
1. "00000000-0000-0000-0000-00000000"
2. "0000000000000000000000000000"
3. "{00000000-0000-0000-0000-00000000}"

- the uuid datatype supports the defined output format by RFC:
"00000000-0000-0000-0000-00000000"

Areas yet in development and testing:

- uuid array indexing.
- testing with joins (merge,hash,gin)
- new_guid() fail proof testing
- performance testing
- testing with internal storage and compression.
- regression test addition
- proper documentation
- overall sanity testing/checking

Please note that I consider this a beta patch.
You can download it from:
http://www.truesoftware.net/pgsql/uuid/patch-0.1/

Regards,
Gevik.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-09-17 23:38:38 8.2 beta blockers
Previous Message Tomi NA 2006-09-17 22:24:54 Re: One of our own begins a new life

Browse pgsql-patches by date

  From Date Subject
Next Message Andreas Pflug 2006-09-18 07:21:37 Re: Patch for UUID datatype (beta)
Previous Message Dan Thomas 2006-09-17 19:52:21 Re: tiny patch to make vacuumdb -a's database order match pg_dumpall