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.