Re: YAGT (yet another GUID thread) - Mailing list pgsql-general

From David Garamond
Subject Re: YAGT (yet another GUID thread)
Date
Msg-id 4008C2B6.2060208@zara.6.isreserved.com
Whole thread Raw
In response to Re: YAGT (yet another GUID thread)  (David Helgason <david@uti.is>)
List pgsql-general
David Helgason wrote:
> I'm already using 'real' GUIDs, which in my case means that the database
> never generates them (since I don't have a generate_real_guid() function
> in the database (and don't need to).
>
> Neither GUID project on gborg (mentioned in another thread) seem to be
> Mac OSX compatible, which is my current platform (but I want to stay
> more-or-less free of platform dependance just yet).

What do you use for generating GUID in OSX? Does OSX have a GUID
generation API/syscall? What is its algorithm, does it show the MAC
address verbatim on the resulting GUID?

> However the client app uses a hex representation internally (don't tell
> me it's silly, it's already coded, due to intricacies of our project
> management), and my PL/PgSQL hex2bit() and bit2hex() functions are damn
> slow, so I'll be converting them to C any day not-so-soon (tried PL/Perl
> too, but even its simpler implementation was 5x slower yet !?)

Interesting. Care to share your plperl code? I would expect Perl to be
not so far behind C for this (at least if your using hex() &
pack()/unpack() and the "b" template; since the hard work will be done
in C routine anyway).

--
dave


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: error creating sql function
Next
From: David Garamond
Date:
Subject: Re: embedded/"serverless" (Re: serverless postgresql)