From: | Tino Wildenhain <tino(at)wildenhain(dot)de> |
---|---|
To: | Magnus Hagander <mha(at)sollentuna(dot)net> |
Cc: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com>, John DeSoi <desoi(at)pgedit(dot)com>, 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 22:17:00 |
Message-ID: | 1122502620.30587.144.camel@Andrea.peacock.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Am Mittwoch, den 27.07.2005, 23:03 +0200 schrieb Magnus Hagander:
> > > This is not really a viable replacement for a GUID ==
> > globally unique
> > > identifier. Here global means that if I use the application in
> > > multiple databases, I'm guaranteed that no two identifiers
> > will be the
> > > same. Using a sequence will only support uniqueness for a single
> > > database.
> > 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.
well, then give each database a numer, name or whatever and
pad sequence with it. Nothing simpler then that.
The global uniqueness is just a wishfull dream. Nobody can
garantie it. If you use a distingushed name or number for
each of your databases, its garantied.
> At least on Windows, the GUID is derived in part from the computers
> primary MAC address. No, it's not a guarantee, but it's pretty unlikely
> :-)
Yes, thats one way.. But really you just need a domain (not
related to the internet meaning of domains ;) Anything
that lets you identify (or at least distinguish) _your_
databases. (unlikely you are working with every or random
databases in the world ;)
You dont even need a hash function (md5, sha1) if uniqueness is
all you need. Otoh, the often raised clash argument with md5 does not
count here because collisions dont happen just per coincidence
given the very limited rule (database-identifier + serial)
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas F. O'Connell | 2005-07-27 22:26:51 | Re: Upgrading from 7.1 |
Previous Message | jbduffy | 2005-07-27 22:08:48 | Real vs Float & 32bit vs 64bit CPU Performance Question |