Re: uuid type for postgres

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: nathan wagner <nw(at)hydaspes(dot)if(dot)org>
Subject: Re: uuid type for postgres
Date: 2005-09-07 16:48:08
Message-ID: 200509070948.08307.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message nathan wagner 2005-09-07 17:04:30 Re: uuid type for postgres
Previous Message Josh Berkus 2005-09-07 16:45:17 Re: uuid type for postgres

Browse pgsql-sql by date

  From Date Subject
Next Message nathan wagner 2005-09-07 17:04:30 Re: uuid type for postgres
Previous Message Josh Berkus 2005-09-07 16:45:17 Re: uuid type for postgres