Re: Patch for UUID datatype (beta)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Gevik Babakhani <pgdev(at)xs4all(dot)nl>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for UUID datatype (beta)
Date: 2006-09-18 14:33:22
Message-ID: 27536.1158590002@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
> Isn't guaranteed uniqueness the very attribute that's expected? AFAIK
> there's a commonly accepted algorithm providing this.

Anyone who thinks UUIDs are guaranteed unique has been drinking too much
of the kool-aid. They're at best probably unique. Some generator
algorithms might make it more probable than others, but you simply
cannot "guarantee" it for UUIDs generated on noncommunicating machines.

One of the big reasons that I'm hesitant to put a UUID generation
function into core is the knowledge that none of them are or can be
perfect ... so people might need different ones depending on local
conditions. I'm inclined to think that a reasonable setup would put
the datatype (with input, output, comparison and indexing support)
into core, but provide a generation function as a contrib module,
making it easily replaceable.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gevik Babakhani 2006-09-18 14:38:49 Re: OID conflicts
Previous Message Martijn van Oosterhout 2006-09-18 14:32:06 Re: OID conflicts

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2006-09-18 14:47:22 Re: [PATCHES] Patch for UUID datatype (beta)
Previous Message Gevik Babakhani 2006-09-18 09:29:03 Re: [PATCHES] Patch for UUID datatype (beta)