Re: uuid type for postgres

Bob Ippolito <bob@redivi.com>

From: Bob Ippolito <bob@redivi.com>
To: nathan wagner <nw@hydaspes.if.org>
Cc: pgsql-hackers@postgresql.org
Date: 2005-09-07T18:47:23Z
Lists: pgsql-hackers, pgsql-sql
On Sep 7, 2005, at 10:04 AM, nathan wagner wrote:

> On Wed, Sep 07, 2005 at 09:45:17AM -0700, josh@agliodbs.com wrote:
>
>
>> I think the issue is portability.  Remember that this type needs  
>> to work on
>> Windows as well as all POSIX platforms and AIX.
>>
>
> I had forgotten about windows.  I'll see to what extent the library  
> i'm
> using is portable to windows.

You don't need to use a non-standard library for a lot of platforms,  
you're pretty much guaranteed UUID support for (at least):
Linux/Darwin/Mac OS X: uuid_generate <uuid/uuid.h> (part of libc, at  
least on Darwin)
FreeBSD: uuid_create <uuid.h> (again, libc)
Windows: UuidCreate <Rpc.h> (link to Rpcrt4.dll, IIRC)

Where a native UUID generate is not available, you can include some  
implementation, but surely other platforms also include UUID  
implementations.

I think Windows portability is a non-issue here.

-bob