pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Cc: nathan wagner <nw@hydaspes.if.org>
Subject: Re: uuid type for postgres
Date: Wed, 7 Sep 2005 09:48:08 -0700
Message-ID: <200509070948.08307.josh@agliodbs.com> (raw)
In-Reply-To: <20050907023606.GA2181@granicus.if.org>
References: <20050906135057.GA24136@granicus.if.org>
	<200509061840.28068.josh@agliodbs.com>
	<20050907023606.GA2181@granicus.if.org>

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



view thread (51+ messages)  latest in thread

Message-ID: <200509070948.08307.josh@agliodbs.com>
Permalink:  ../200509070948.08307.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200509070948.08307.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, pgsql-hackers@postgresql.org, nw@hydaspes.if.org
  Subject: Re: uuid type for postgres
  In-Reply-To: <200509070948.08307.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox