Re: GUID for postgreSQL

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: Tino Wildenhain <tino(at)wildenhain(dot)de>, Riaan van der Westhuizen <riaan(at)huizensoft(dot)co(dot)za>, Postgresql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: GUID for postgreSQL
Date: 2005-07-27 21:00:48
Message-ID: 1122498047.15145.141.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2005-07-27 at 15:57, John DeSoi wrote:
> On Jul 27, 2005, at 4:46 PM, Scott Marlowe wrote:
>
> > So, how can two databases, not currently talking to one another,
> > guarantee that their GUIDs don't collide? using a large randomly
> > generated name space only reduces the chances of collision, it doesn't
> > actually guarantee it.
>
>
> Like MD5, there is no 100% guarantee, but the collision possibility
> supposed to be is very close to zero.

Then I would think a better thought out solution would be one where your
unique ids ARE guaranteed to be unique, where you used something like

select 'astringuniqtothismachine'||nextval('localsequence');

That really would be guaranteed unique as long as you set up each
machine to have a string unique to it.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2005-07-27 21:03:00 Re: GUID for postgreSQL
Previous Message Ben 2005-07-27 20:58:18 Re: GUID for postgreSQL