| From: | John Hasler <john(at)dhh(dot)gt(dot)org> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: GUID in postgres |
| Date: | 2001-10-25 12:33:04 |
| Message-ID: | 87snc7x5kv.fsf@toncho.dhh.gt.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-sql |
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(at)dhh(dot)gt(dot)org
Dancing Horse Hill
Elmwood, Wisconsin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | steve boyle | 2001-10-25 12:36:09 | Re: Using other database tables in a query |
| Previous Message | steve boyle | 2001-10-25 12:25:26 | Re: Stored procedure |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Reiner Dassing | 2001-10-25 12:52:48 | Re: [HACKERS] Index of a table is not used (in any case) |
| Previous Message | Horst Herb | 2001-10-25 03:53:27 | Re: GUID in postgres |