Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-17 Thread Peter Eisentraut
Tom Lane wrote:
> Alvaro Herrera <[EMAIL PROTECTED]> 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/

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-12 Thread Steve Midgley

At 09:20 AM 2/12/2008, [EMAIL PROTECTED] wrote:

Date: Mon, 11 Feb 2008 11:56:33 -0500
From: Tom Lane <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: pgsql-sql@postgresql.org
Subject: Re: Usage of UUID with 8.3 (Windows)
Message-ID: <[EMAIL PROTECTED]>

[EMAIL PROTECTED] 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) under Windows?


Figure out how to build ossp-uuid on Windows ...

regards, tom lane


You can review this thread too. MS provides native WinAPI tools and 
language wrappers for this job:


http://answers.google.com/answers/threadview?id=553194

Here's the specific API call, which could possibly be wrapped inside PG 
- however that raises the problem Tom notes about "boatloads of 
platform specific code" -- I'd guess that a custom written stored 
procedure is the way to go? Not sure how to make WinAPI calls from PG - 
perhaps someone on list has experience or references for that:


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuidcreate.asp

HTH,

Steve


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> 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

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-11 Thread Alvaro Herrera
Tom Lane wrote:
> [EMAIL PROTECTED] 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) under Windows?
> 
> 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 Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-11 Thread Tom Lane
[EMAIL PROTECTED] 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) under Windows?

Figure out how to build ossp-uuid on Windows ...

regards, tom lane

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org