pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Usage of UUID with 8.3 (Windows)
7+ messages / 6 participants
[nested] [flat]

* Usage of UUID with 8.3 (Windows)
@ 2008-02-11 10:25 ncode@gmx.com
  2008-02-11 16:56 ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: ncode@gmx.com @ 2008-02-11 10:25 UTC (permalink / raw)
  To: pgsql-sql

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) under Windows?



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Usage of UUID with 8.3 (Windows)
  2008-02-11 10:25 Usage of UUID with 8.3 (Windows) ncode@gmx.com
@ 2008-02-11 16:56 ` Tom Lane <tgl@sss.pgh.pa.us>
  2008-02-11 17:04   ` Re: Usage of UUID with 8.3 (Windows) Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2008-02-11 16:56 UTC (permalink / raw)
  To: ncode@gmx.com; +Cc: pgsql-sql

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) under Windows?

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

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Usage of UUID with 8.3 (Windows)
  2008-02-11 10:25 Usage of UUID with 8.3 (Windows) ncode@gmx.com
  2008-02-11 16:56 ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-02-11 17:04   ` Alvaro Herrera <alvherre@commandprompt.com>
  2008-02-11 17:35     ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Alvaro Herrera @ 2008-02-11 17:04 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: ncode@gmx.com; pgsql-sql

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) 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 Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Usage of UUID with 8.3 (Windows)
  2008-02-11 10:25 Usage of UUID with 8.3 (Windows) ncode@gmx.com
  2008-02-11 16:56 ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
  2008-02-11 17:04   ` Re: Usage of UUID with 8.3 (Windows) Alvaro Herrera <alvherre@commandprompt.com>
@ 2008-02-11 17:35     ` Tom Lane <tgl@sss.pgh.pa.us>
  2008-02-12 09:05       ` Usage of UUID with 8.3 (Windows) Sven Sporer <ncode@gmx.com>
  2008-02-17 15:20       ` Re: Usage of UUID with 8.3 (Windows) Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 2 replies; 7+ messages in thread

From: Tom Lane @ 2008-02-11 17:35 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: ncode@gmx.com; pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Usage of UUID with 8.3 (Windows)
  2008-02-11 10:25 Usage of UUID with 8.3 (Windows) ncode@gmx.com
  2008-02-11 16:56 ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
  2008-02-11 17:04   ` Re: Usage of UUID with 8.3 (Windows) Alvaro Herrera <alvherre@commandprompt.com>
  2008-02-11 17:35     ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-02-12 09:05       ` Sven Sporer <ncode@gmx.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Sven Sporer @ 2008-02-12 09:05 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

> > 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 development in 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 function to create a v4 UUID based on a randomly generated number (see MySQL: UUID()) would be useful though.




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Usage of UUID with 8.3 (Windows)
  2008-02-11 10:25 Usage of UUID with 8.3 (Windows) ncode@gmx.com
  2008-02-11 16:56 ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
  2008-02-11 17:04   ` Re: Usage of UUID with 8.3 (Windows) Alvaro Herrera <alvherre@commandprompt.com>
  2008-02-11 17:35     ` Re: Usage of UUID with 8.3 (Windows) Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-02-17 15:20       ` Peter Eisentraut <peter_e@gmx.net>
  1 sibling, 0 replies; 7+ messages in thread

From: Peter Eisentraut @ 2008-02-17 15:20 UTC (permalink / raw)
  To: pgsql-sql; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@commandprompt.com>; ncode@gmx.com

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/



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Usage of UUID with 8.3 (Windows)
@ 2008-02-12 18:11 Steve Midgley <public@misuse.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Steve Midgley @ 2008-02-12 18:11 UTC (permalink / raw)
  To: pgsql-sql

At 09:20 AM 2/12/2008, pgsql-sql-owner@postgresql.org wrote:
>Date: Mon, 11 Feb 2008 11:56:33 -0500
>From: Tom Lane <tgl@sss.pgh.pa.us>
>To: ncode@gmx.com
>Cc: pgsql-sql@postgresql.org
>Subject: Re: Usage of UUID with 8.3 (Windows)
>Message-ID: <2916.1202748993@sss.pgh.pa.us>
>
>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) 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




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2008-02-17 15:20 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-02-11 10:25 Usage of UUID with 8.3 (Windows) ncode@gmx.com
2008-02-11 16:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-02-11 17:04   ` Alvaro Herrera <alvherre@commandprompt.com>
2008-02-11 17:35     ` Tom Lane <tgl@sss.pgh.pa.us>
2008-02-12 09:05       ` Sven Sporer <ncode@gmx.com>
2008-02-17 15:20       ` Peter Eisentraut <peter_e@gmx.net>
2008-02-12 18:11 Re: Usage of UUID with 8.3 (Windows) Steve Midgley <public@misuse.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox