Re: [PATCH] Implement uuid_version()

From: Jose Luis Tallon <jltallon(at)adv-solutions(dot)net>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [PATCH] Implement uuid_version()
Date: 2019-06-11 10:31:29
Message-ID: c23e95cd-dc55-62cf-120a-593e0e6e836c@adv-solutions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/6/19 10:49, Peter Eisentraut wrote:
> On 2019-04-09 08:04, Peter Eisentraut wrote:
>> On 2019-04-08 23:06, Andres Freund wrote:
>>> The randomness based UUID generators don't really have dependencies, now
>>> that we have a dependency on strong randomness. I kinda thing the
>>> dependency argument actually works *against* uuid-ossp - precisely
>>> because of its dependencies (which also vary by OS) it's not a proper
>>> replacement for a type of facility a very sizable fraction of our users
>>> need.
>> Yeah, I think implementing a v4 generator in core would be trivial and
>> address almost everyone's requirements.
> Here is a proposed patch for this. I did a fair bit of looking around
> in other systems for a naming pattern but didn't find anything
> consistent. So I ended up just taking the function name and code from
> pgcrypto.
>
> As you can see, the code is trivial and has no external dependencies. I
> think this would significantly upgrade the usability of the uuid type.

Yes, indeed. Thanks!

This is definitively a good step towards removing external dependencies
for general usage of UUIDs. As recently commented, enabling extensions
at some MSPs/Cloud providers can be a bit challenging.

I wonder whether re-implementing some more of the extension's (ie. UUID
v5) in terms of PgCrypto and in-core makes sense / would actually be
accepted into core?

I assume that Peter would like to commit that potential patch series?

Thanks,

    / J.L.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-06-11 11:11:51 Re: [PATCH] Implement uuid_version()
Previous Message Adrien Nayrat 2019-06-11 10:22:59 Re: [PATCH] Speedup truncates of relation forks