Re: GUID for postgreSQL

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: GUID for postgreSQL
Дата
Msg-id 1122502620.30587.144.camel@Andrea.peacock.de
обсуждение исходный текст
Ответ на Re: GUID for postgreSQL  ("Magnus Hagander" <mha@sollentuna.net>)
Список 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)



В списке pgsql-general по дате отправления:

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: GUID for postgreSQL
Следующее
От: "Thomas F. O'Connell"
Дата:
Сообщение: Re: Upgrading from 7.1