Re: GUID in postgres - Mailing list pgsql-sql

From Horst Herb
Subject Re: GUID in postgres
Date
Msg-id 20011025034926.30847.qmail@gnumed.dhs.org
Whole thread Raw
In response to Re: GUID in postgres  (John Hasler <john@dhh.gt.org>)
Responses Re: GUID in postgres  (John Hasler <john@dhh.gt.org>)
Re: GUID in postgres  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
On Thursday 25 October 2001 03:41, John Hasler wrote:
> Josh writes:
> > I'm sure you could make your own GUID, whatever one is.
>
> Globally Unique IDentifier, probably.  Just hash a 128 bit random number
> with the current date.

That gives you no gurantee it will be unique.

What we are using is the following:
- All tables in need of a global ID _within_ a database inherit a globid 
table which contains nothing but an ID of type serial.
- When we need cross-database unique IDs within the same system, the globid 
table contains a database identifier as well (like the OID of the pg_database 
entry for the database).

Horst


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: dropping foreign key
Next
From: suzuyam1102001@yahoo.com (Suyam)
Date:
Subject: Question regarding Function & Return table