Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Patch for UUID datatype (beta)

From: "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com>
To: "mark(at)mark(dot)mielke(dot)cc" <mark(at)mark(dot)mielke(dot)cc>
Cc: "Jim C(dot) Nasby" <jimn(at)enterprisedb(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>, "Gevik Babakhani" <pgdev(at)xs4all(dot)nl>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Patch for UUID datatype (beta)
Date: 2006-09-20 07:02:56
Message-ID: 7be3f35d0609200002n19af5287r642614ab572f7352@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Mark,

>
> A model that intended to try and guarantee uniqueness would provide a
> UUID generation service for the entire host, that was not specific to
> any application, or database, possibly accessible via the loopback
> address. It would ensure that at any given time, either the time is
> new, or the sequence is new for the time. If computer time ever went
> backwards, it could keep the last time issued persistent, and
> increment from this point forward through the clock sequence values
> until real time catches up. An alternative would be along the lines of
> a /dev/uuid device, that like /dev/random, would be responsible for
> outputting unique uuid values for the system. Who does this? Probably
> nobody. I'm tempted to implement it, though, for my uses. :-)
>

That is an excellent summary. There is just one wrong assumption in it:

>Probably nobody.

Within win32 there is an API call, which provides you with an GUID / UUID
with to my knowledge exactly the features you are describing. win32 is
installed on some computers. So for PostgreSQL on win32 the new_guid() you
describe in detail would be quite simple to implement: a call to
CoCreateGuid.

The challenging part is: I use PostgreSQL in a mixed environment. And Linux
i.e. does not provide CoCreateGuid. That's why I am voting to have it in
PostgreSQL :)

Harald
-- 
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstra├če 202b
70197 Stuttgart
0173/9409607
-
Let's set so double the killer delete select all.

In response to

pgsql-hackers by date

Next:From: Teodor SigaevDate: 2006-09-20 07:56:37
Subject: Re: pgsql: Remove completed TODO items: < * -Make postmater
Previous:From: Jeremy DrakeDate: 2006-09-20 06:07:18
Subject: Re: polite request about syntax

pgsql-patches by date

Next:From: Gregory StarkDate: 2006-09-20 09:04:00
Subject: Re: [PATCHES] Patch for UUID datatype (beta)
Previous:From: markDate: 2006-09-20 04:04:27
Subject: Re: [HACKERS] Patch for UUID datatype (beta)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group