Skip site navigation (1) Skip section navigation (2)

Re: Re: New data type: uniqueidentifier

From: Thomas Swan <tswan(at)olemiss(dot)edu>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, "Dmitry G(dot) Mastrukov" <dmitry(at)taurussoft(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: New data type: uniqueidentifier
Date: 2001-07-03 01:54:01
Message-ID: 3B4125B9.5080607@olemiss.edu (view raw or flat)
Thread:
Lists: pgsql-hackers
I sit corrected.  

*slightly humbled*

Why not do an unsigned int16 to hold your UUID generated numbers.   
Ultimately, this would seem to be a more general solution and accomplish 
your goals at the sametime.  Or, am I completely missing something.

Christopher Kings-Lynne wrote:

>>don't create a bazillion datatypes.  Besides, 128 bit numbers are 7
>>byte integers.
>>
>
>Hang on:  128 div 8 = 16 byte integer
>
>>PostgreSQL has an int8 (8 byte integer) datatype.
>>
>
>And therefore it is a _64_ bit integer and you can't have a 256bit unique
>number in it...
>
>>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
>>violating my first sentence.}  Then, you'd have the same thing (or
>>better) AND your not relying on randomness.
>>
>
>Chris
>


In response to

Responses

pgsql-hackers by date

Next:From: Alex PilosovDate: 2001-07-03 02:27:31
Subject: Re: selecting from cursor
Previous:From: Tom LaneDate: 2001-07-03 01:51:00
Subject: Re: selecting from cursor

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group