Re: New data type: uniqueidentifier - Mailing list pgsql-hackers

From Thomas Swan
Subject Re: New data type: uniqueidentifier
Date
Msg-id 3B409DB5.7060706@olemiss.edu
Whole thread Raw
In response to Re: New data type: uniqueidentifier  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Re: New data type: uniqueidentifier  (Alex Pilosov <alex@pilosoft.com>)
RE: Re: New data type: uniqueidentifier  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
Peter Eisentraut wrote:<br /><blockquote cite="mid:Pine.LNX.4.30.0106271653340.729-100000@peter.localdomain"
type="cite"><prewrap="">Dmitry G. Mastrukov writes:<br /><br /></pre><blockquote type="cite"><pre wrap="">I've
developednew data type for PostgreSQL - unique identifier - 128-bit<br />value claims to be unique across Universe. It
dependson libuuid from<br />e2fsprogs by Theodore Ts'o.<br /></pre></blockquote><pre wrap=""><br />ISTM that this
shouldbe a function, not a data type.<br /><br /></pre></blockquote> I'd second the function idea: function uuid( )
returnsan int8 value; don't create a bazillion datatypes.  Besides, 128 bit numbers are 7 byte integers.   PostgreSQL
hasan int8 (8 byte integer) datatype.  While I like the UUID function idea, I'd recommend a better solution to creating
an"unique" identifier.  Why not create a serial8 datatype: int8 with an int8 sequence = 256bit "unique" number.  {Yes,
Iknow I'm violating my first sentence.}  Then, you'd have the same thing (or better) AND your not relying on
randomness. <br /><br /> 

pgsql-hackers by date:

Previous
From: Lamar Owen
Date:
Subject: Re: Now it's my turn...
Next
From: Bill Studenmund
Date:
Subject: Re: shared library strangeness?