From: | Thomas Swan <tswan(at)olemiss(dot)edu> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | "Dmitry G(dot) Mastrukov" <dmitry(at)taurussoft(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: New data type: uniqueidentifier |
Date: | 2001-07-02 16:13:41 |
Message-ID: | 3B409DB5.7060706@olemiss.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
>Dmitry G. Mastrukov writes:
>
>>I've developed new data type for PostgreSQL - unique identifier - 128-bit
>>value claims to be unique across Universe. It depends on libuuid from
>>e2fsprogs by Theodore Ts'o.
>>
>
>ISTM that this should be a function, not a data type.
>
I'd second the function idea: function uuid( ) returns an int8 value;
don't create a bazillion datatypes. Besides, 128 bit numbers are 7 byte
integers. PostgreSQL has an 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, I know I'm violating my
first sentence.} Then, you'd have the same thing (or better) AND your
not relying on randomness.
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Studenmund | 2001-07-02 16:29:23 | Re: shared library strangeness? |
Previous Message | Lamar Owen | 2001-07-02 15:50:14 | Re: Now it's my turn... |