GUID/UUID Support

From: "Patrick Earl" <patearl(at)patearl(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: GUID/UUID Support
Date: 2007-01-16 22:47:09
Message-ID: e0762e610701161447q537f7492iee797f82fdb14a64@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings all. I've been poking around the web and trying to track
the status of the GUID/UUID patches. In the todo list, that item is
not marked as going into 8.3, and I feel this is unfortunate.

Searching google for "postgresql guid -guide" comes up with around
200,000 hits. It's obviously been a popular topic over time.

There was some discussion about including a generator in the core or
not. Even a random generator (version 4 UUID) would be great in my
opinion. The Wikipedia article about UUIDs produces some statistics
about a random source ID that are interesting.

http://en.wikipedia.org/wiki/UUID

If you generate 2^41 (2'199'023'255'552) true random ids, the
probability of getting a duplicate is 0.000'000'000'000'4. For
comparison, the page indicates that the probability of getting hit by
a meteorite is 0.000'000'000'06.

If there are qualms about a generator that only produces one type of
IDs, could the database not just provide a way to generate a "version
X" uuid? Some versions would be implemented later.

One thing that is quite important, to me at least, is to make the GUID
generation functionality cross-platform. Using a random UUID
technique for an initial implementation would simplify this issue.

Even if the generator is punted to contrib, I would like to see at
least native UUID field support in the next version.

Patrick

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chad Wagner 2007-01-16 23:30:00 Re: invalid byte sequence for encoding "UTF8"
Previous Message Martijn van Oosterhout 2007-01-16 22:04:55 Re: 8.1 vs 8.2.1 view optimization