Re: uuid type for postgres

From: Bob Ippolito <bob(at)redivi(dot)com>
To: nathan wagner <nw(at)hydaspes(dot)if(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: uuid type for postgres
Date: 2005-09-07 18:47:23
Message-ID: 914AC2C5-A81F-415B-B5AC-832A22D12ECB@redivi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)agliodbs(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2005-09-07 18:50:15 Re: Attention PL authors: want to be listed in template table?
Previous Message Merlin Moncure 2005-09-07 18:41:49 Re: PostgreSQL from source using MinGW

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-07 19:00:43 Re: uuid type for postgres
Previous Message Josh Berkus 2005-09-07 18:31:16 Re: uuid type for postgres