Re: Re: New data type: uniqueidentifier

Поиск
Список
Период
Сортировка
От Thomas Swan
Тема Re: Re: New data type: uniqueidentifier
Дата
Msg-id 3B4125B9.5080607@olemiss.edu
обсуждение исходный текст
Ответ на RE: Re: New data type: uniqueidentifier  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: Re: New data type: uniqueidentifier  (Alex Pilosov <alex@pilosoft.com>)
Список pgsql-hackers
I sit corrected.  <br /><br /> *slightly humbled*<br /><br /> 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
Icompletely missing something.<br /><br /> Christopher Kings-Lynne wrote:<br /><blockquote
cite="mid:ECEHIKNFIMMECLEBJFIGKECECBAA.chriskl@familyhealth.com.au"type="cite"><blockquote type="cite"><pre
wrap="">don'tcreate a bazillion datatypes.  Besides, 128 bit numbers are 7<br />byte integers.<br
/></pre></blockquote><prewrap=""><br />Hang on:  128 div 8 = 16 byte integer<br /><br /></pre><blockquote
type="cite"><prewrap="">PostgreSQL has an int8 (8 byte integer) datatype.<br /></pre></blockquote><pre wrap=""><br
/>Andtherefore it is a _64_ bit integer and you can't have a 256bit unique<br />number in it...<br /><br
/></pre><blockquotetype="cite"><pre wrap="">While I like the UUID function idea, I'd recommend a better solution to<br
/>creatingan "unique" identifier.  Why not create a serial8 datatype:<br />int8 with an int8 sequence = 256bit "unique"
number. {Yes, I know<br />violating my first sentence.}  Then, you'd have the same thing (or<br />better) AND your not
relyingon randomness.<br /></pre></blockquote><pre wrap=""><br />Chris<br /></pre></blockquote><br /><br /> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: selecting from cursor
Следующее
От: Alex Pilosov
Дата:
Сообщение: Re: selecting from cursor