Thread: Usage of UUID with 8.3 (Windows)

Usage of UUID with 8.3 (Windows)

From
ncode@gmx.com
Date:
Hello list,

the UUID datatype in the recent version is a feature we intend to use in the near future. To generate a UUID in the
database,the Linux release includes contrib modules which can be used for that (together with the uuid lib).
 

Now, what do I have to do in order to generate a valid UUID (or the 5 different versions as implemented by the RFC)
underWindows?
 


Re: Usage of UUID with 8.3 (Windows)

From
Tom Lane
Date:
ncode@gmx.com writes:
> Now, what do I have to do in order to generate a valid UUID (or the 5 different versions as implemented by the RFC)
underWindows?
 

Figure out how to build ossp-uuid on Windows ...
        regards, tom lane


Re: Usage of UUID with 8.3 (Windows)

From
Alvaro Herrera
Date:
Tom Lane wrote:
> ncode@gmx.com writes:
> > Now, what do I have to do in order to generate a valid UUID (or the 5 different versions as implemented by the RFC)
underWindows?
 
> 
> Figure out how to build ossp-uuid on Windows ...

I think Windows has its own UUID generator, so the best bet would be to
make that work.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Usage of UUID with 8.3 (Windows)

From
Tom Lane
Date:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> Figure out how to build ossp-uuid on Windows ...

> I think Windows has its own UUID generator, so the best bet would be to
> make that work.

Only if it can be made to present the same SQL-level API as we have for
OSSP.  Otherwise we'll be faced with boatloads of platform-dependent
client code ...
        regards, tom lane


Usage of UUID with 8.3 (Windows)

From
"Sven Sporer"
Date:
> > I think Windows has its own UUID generator, so the best bet would be to
> > make that work.
> 
> Only if it can be made to present the same SQL-level API as we have for
> OSSP.  Otherwise we'll be faced with boatloads of platform-dependent
> client code ...

I'm just curious, but why aren't those features included in the Windows version in order to prevent platform-dependent
developmentin that direction? The same Postgres version now essentially provides different features depending on the
platform.

I understand now that you just want to provide the facilities for UUID handling (datatype). You have to agree that a
functionto create a v4 UUID based on a randomly generated number (see MySQL: UUID()) would be useful though.
 



Re: Usage of UUID with 8.3 (Windows)

From
Peter Eisentraut
Date:
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Tom Lane wrote:
> >> Figure out how to build ossp-uuid on Windows ...
> >
> > I think Windows has its own UUID generator, so the best bet would be to
> > make that work.
>
> Only if it can be made to present the same SQL-level API as we have for
> OSSP.  Otherwise we'll be faced with boatloads of platform-dependent
> client code ...

Indeed.  Linux, for example, also has "its own" UUID generator, but I 
intentionally used the OSSP library, because it is platform independent.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/