Re: [PATCH] Implement uuid_version()
От | Ian Barwick |
---|---|
Тема | Re: [PATCH] Implement uuid_version() |
Дата | |
Msg-id | d3b99933-da2b-8ea4-20f4-996f91052534@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Implement uuid_version() (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
Список | pgsql-hackers |
On 7/14/19 9:40 PM, Peter Eisentraut wrote: > On 2019-07-13 17:13, Fabien COELHO wrote: >>>> What about avoiding a redirection with something like: >>>> >>>> Datum (* const pg_random_uuid)(PG_FUNCTION_ARGS) = gen_random_uuid; >>> >>> That seems very confusing. >> >> Dunno. Possibly. The user does not have to look at the implementation, and >> probably such code would deserve a comment. >> >> The point is to avoid one call so as to perform the same (otherwise the >> pg_random_uuid would be slightly slower), and to ensure that it behaves >> the same, as it would be the very same function by construction. >> >> I've switched the patch to ready anyway. > > committed Small doc tweak suggestion - the pgcrypto docs [1] now say about gen_random_uuid(): Returns a version 4 (random) UUID. (Obsolete, this function is now also included in core PostgreSQL.) which gives the impression the code contains two versions of this function, the core one and an obsolete one in pgcrypto. Per the commit message the situation is actually: The pgcrypto implementation now internally redirects to the built-in one. Suggested wording improvement in the attached patch. [1] https://www.postgresql.org/docs/devel/pgcrypto.html#id-1.11.7.34.9 Regards Ian Barwick -- Ian Barwick https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: