Re: [PATCH] Implement uuid_version() - Mailing list pgsql-hackers

From Jose Luis Tallon
Subject Re: [PATCH] Implement uuid_version()
Date
Msg-id 6d26a004-e8c7-af33-5cce-94180fb0d46f@adv-solutions.net
Whole thread Raw
In response to Re: [PATCH] Implement uuid_version()  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [PATCH] Implement uuid_version()
Re: [PATCH] Implement uuid_version()
List pgsql-hackers
On 13/7/19 8:31, Fabien COELHO wrote:
>
> Hello Jose,

Hello, Fabien

Thanks for taking a look

>
>> Got it, and done. Please find attached a v2 patch with the upgrade 
>> script included.
>
> Patch v2 applies cleanly. Compiles cleanly (once running configure 
> --with-uuid=...). Local make check ok. Doc build ok.
>
> There are no tests, I'd suggest to add some under sql & change 
> expected if possible which would return all possible values, including 
> with calling pg_random_uuid() which should return 4.
>
> Documentation describes uuid_version(), should it not describe 
> uuid_version(namespace uuid)?
>
> I'd suggest to add an example.
>
> The extension update script seems ok, but ISTM that 
> "uuid-ossp-1.1.sql" should be replaced with an updated 
> "uuid-ossp-1.2.sql".
>
This was a quite naïf approach to the issue on my part, more a "scratch 
my own itch" than anything else.... but definitively sparked some 
interest. Thanks to all involved.

Considering the later arguments on-list, I plan on submitting a more 
elaborate patchset integrating the feedback received so far, and along 
the following lines:

- uuid type, v4 generation and uuid_version() in core

- Provide a means to rename/supercede extensions keeping backwards 
compatibility (i.e. uuid-ossp -> uuid, keep old code working)

- Miscellaneous other functionality

- Drop "dead" code

   ...but I've tried to keep quiet so as not to disturb too much around 
release time.


I intend to continue working on this in late July, aiming for the 
following commitfest (once more "urgent" patches will have landed)


Thanks again.

     J.L.





pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Comment fix of config_default.pl
Next
From: Amit Kapila
Date:
Subject: Re: POC: Cleaning up orphaned files using undo logs