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

From: Matteo Beccati <php(at)beccati(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>, Dave Page <dpage(at)postgresql(dot)org>, Jakob Egger <jakob(at)eggerapps(dot)at>, Palle Girgensohn <girgen(at)pingpong(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: uuid-ossp (Re: [pgsql-packagers] Postgresapp 9.4 beta build ready)
Date: 2014-05-23 08:05:49
Message-ID: 537F015D.4020101@beccati.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip kumar 2014-05-23 08:28:56 Re: Allowing join removals for more join types
Previous Message David Rowley 2014-05-23 07:13:03 Re: Allowing join removals for more join types