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

From Fabien COELHO
Subject Re: [PATCH] Implement uuid_version()
Date
Msg-id alpine.DEB.2.21.1907130753320.8895@lancre
Whole thread Raw
In response to Re: [PATCH] Implement uuid_version()  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [PATCH] Implement uuid_version()
List pgsql-hackers
Hello Peter,

>>>> A possible option 3 is to keep the function in pgcrypto but change
>>>> its C code to call the core code.
>
> Updated patch with this change included.

Patch applies cleanly, compiles (both pg and pgcrypto). make check (global 
and pgcrypto) ok. Doc generation ok. Minor comments:

About doc: I'd consider "generation" instead of "generating" as a 
secondary index term.

> (There is also precedent for redirecting the extension function to the
> internal one by changing the SQL-level function definition using CREATE
> OR REPLACE FUNCTION ... LANGUAGE INTERNAL.  But that seems more
> complicated and would require a new extension version.  It could maybe
> be included if the extension version is changed for other reasons.)

What about avoiding a redirection with something like:

Datum (* const pg_random_uuid)(PG_FUNCTION_ARGS) = gen_random_uuid;

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Why is infinite_recurse test suddenly failing?
Next
From: Thomas Munro
Date:
Subject: Re: Allow an alias to be attached directly to a JOIN ... USING