Re: uuid-ossp (Re: [pgsql-packagers] Postgresapp 9.4 beta build ready) - Mailing list pgsql-hackers

From Matteo Beccati
Subject Re: uuid-ossp (Re: [pgsql-packagers] Postgresapp 9.4 beta build ready)
Date
Msg-id 537F015D.4020101@beccati.com
Whole thread Raw
In response to Re: uuid-ossp (Re: [pgsql-packagers] Postgresapp 9.4 beta build ready)  (Matteo Beccati <php@beccati.com>)
Responses Re: uuid-ossp (Re: [pgsql-packagers] Postgresapp 9.4 beta build ready)
List pgsql-hackers
On 22/05/2014 21:55, Matteo Beccati wrote:
> On 22/05/2014 17:07, Tom Lane wrote:
>> Well, *I* don't want to do that work.  I was hoping to find a volunteer,
>> but the silence has been notable.  I think deprecation is the next step.
> 
> This sounds an easy enough task to try and submit a patch, if I'm able
> to allocate enough time to work on it.
> 
> I have successfully compiled the extension on a NetBSD box using a
> slightly modified version of Palle's patch. I have a few doubts though:
> 
> - should we keep the extension name? If not, what would be the plan?
> - the patch also uses BSD's own md5 and sha1 implementations: for md5 I
> should be able to use pg's own core version, but I'm not sure about
> sha1, as it lives in pgcrypto. Any suggestion?

Maybe I've put the cart before the horse a little bit ;)

Anyway, BSD and Linux UUID implementations are slightly different, but I
was able to get two variants of the extension to compile on NetBSD and
Ubuntu. I don't have the necessary autoconf-fu to "merge" them together
though, and to make sure that they compile on the various bsd/linux
flavours.

You can find the code here:
https://github.com/mbeccati/uuid # NetBSD variant
https://github.com/mbeccati/uuid/tree/linux # Ubuntu variant

For now, I've forked just RhodiumToad's uuid-freebsd extension, but I've
made sure make works fine when cloned in the contrib folder.

* Both the variants use a copy of pgcrypto md5/sha1 implementations to
generate v3 and v5 UUIDs as porting is much easier than trying to use
the system provided ones, if any.
* I've fixed a bug in v3/v5 generation wrt endianness as the results I
was getting didn't match the RFC.
* The code is PoC quality and I haven't touched the docs/readme yet.


Cheers
-- 
Matteo Beccati

Development & Consulting - http://www.beccati.com/



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Allowing join removals for more join types
Next
From: Dilip kumar
Date:
Subject: Re: Allowing join removals for more join types