Re: GUID for postgreSQL - Mailing list pgsql-general

From Scott Marlowe
Subject Re: GUID for postgreSQL
Date
Msg-id 1122498047.15145.141.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: GUID for postgreSQL  (John DeSoi <desoi@pgedit.com>)
Responses Re: GUID for postgreSQL
Re: GUID for postgreSQL
List 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.

pgsql-general by date:

Previous
From: Ben
Date:
Subject: Re: GUID for postgreSQL
Next
From: "Magnus Hagander"
Date:
Subject: Re: GUID for postgreSQL