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) ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org