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. ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster