Re: uuid type for postgres

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: uuid type for postgres
Дата
Msg-id 200509070948.08307.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: uuid type for postgres  (nathan wagner <nw@hydaspes.if.org>)
Ответы Re: uuid type for postgres  (nathan wagner <nw@hydaspes.if.org>)
Список pgsql-hackers
Nathan,

> Take a look at the version 3 or version 5 UUIDs.  They essentially do this.
> The hash isn't reversable, but rather recreatable.  Seems that if it
> were reversable, it would be compression, not a hash.  Anyway.

Hmmm, yes, true.

> You're assuming though that you want to leak this information.  If you do,
> or you don't care, go ahead with the v3 or v5 uuid creator.
>
> Or use v1 if you want mac/time based uuids, or v4 for random uuids.
>
> The convenient thing about using the uuid library is that all of these
> mechanisms result in the same type, and are thus compatible.

That's good, it gives users options.  And I can see why you don't want to 
re-create the functionality in PG code, it's probably pretty large.

> > I've never understood the complex measures which
> > application developers take to create "universal" IDs.
>
> Different applications have different goals.  Unguessability might
> be important in some contexts.

Well, IMHO, if the unguessability of UUIDs is an important part of your spec, 
you have some design problems.   But it's not my job to lock up the 
foot-guns, just to make sure they come with warnings ...

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Attention PL authors: want to be listed in template table?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: uuid type for postgres