Re: UUID column as pimrary key?
От | Adrian Klaver |
---|---|
Тема | Re: UUID column as pimrary key? |
Дата | |
Msg-id | 4D24A309.3070509@gmail.com обсуждение исходный текст |
Ответ на | Re: UUID column as pimrary key? (Scott Ribe <scott_ribe@elevated-dev.com>) |
Ответы |
Re: UUID column as pimrary key?
|
Список | pgsql-general |
On 01/05/2011 08:29 AM, Scott Ribe wrote: > On Jan 5, 2011, at 9:01 AM, Tom Lane wrote: > >> In practical use I think the odds of a collision are *far* higher than >> you are suggesting, unless the UUID generation is being done with a lot >> more care than is likely if the user takes these sorts of claims at face >> value. > > Eh? The user taking such claims at face value has no bearing whatsoever on the quality of the UUID generation algorithmprovided by the OS. So, unless we're talking about users coming up with their own algorithms, it seems reasonableto assume that the generation is done with a great deal of care. (And if we are talking about users coming up withtheir own algorithms, then all bets are off; feel free to assume the worst.) I know that is the case on OS X& Linux.I would be shocked if it were not the case on Solaris. I would even be surprised if it were not the case on Windows. > > The IETF Network Working Group designed UUIDs to ensure that their uniqueness guarantee would be strong enough that noapplication would need to worry about duplicates, ever. Claims that collisions are too likely to depend on UUIDs beingunique really are claims that the IETF Network Working Group didn't know what it was doing, which I find a bit ridiculous. > Maybe or maybe not:) http://www.ietf.org/rfc/rfc4122.txt "4.3. Algorithm for Creating a Name-Based UUID The version 3 or 5 UUID is meant for generating UUIDs from "names" that are drawn from, and unique within, some "name space". The concept of name and name space should be broadly construed, and not limited to textual names. For example, some name spaces are the domain name system, URLs, ISO Object IDs (OIDs), X.500 Distinguished Names (DNs), and reserved words in a programming language. The mechanisms or conventions used for allocating names and ensuring their uniqueness within their name spaces are beyond the scope of this specification. The requirements for these types of UUIDs are as follows: o The UUIDs generated at different times from the same name in the same namespace MUST be equal. ...... " -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-general по дате отправления: