From: John Hasler <john@dhh.gt.org>
To: pgsql-sql@postgresql.org
Subject: Re: GUID in postgres
Date: 25 Oct 2001 07:33:04 -0500
Message-ID: <87snc7x5kv.fsf@toncho.dhh.gt.org> (raw)
In-Reply-To: <20011025034926.30847.qmail@gnumed.dhs.org>
References: <web-491315@davinci.ethosmedia.com>
<87adyhx7ew.fsf@toncho.dhh.gt.org>
<20011025034926.30847.qmail@gnumed.dhs.org>
I wrote:
> Globally Unique IDentifier, probably. Just hash a 128 bit random number
> with the current date.
Horst writes:
> That gives you no gurantee it will be unique.
There is no such guarantee. The probability of a collision due to errors
and bugs using a "deterministic" system is sure to be at least as large as
the the probability of a chance collision using large random numbers
(_random_, not pseudorandom). Stick machine, table, and database ID's in
there as well if it makes you more comfortable, but even without them the
risk of a collision is down there with the risk of cosmic ray induced
errors. _Nothing_, however, can make it zero.
> - 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).
And that's fine, but the GUID system uses the word "global" in a much more
grandiose sense.
--
John Hasler
john@dhh.gt.org
Dancing Horse Hill
Elmwood, Wisconsin
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: john@dhh.gt.org
Subject: Re: GUID in postgres
In-Reply-To: <87snc7x5kv.fsf@toncho.dhh.gt.org>
* 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