Re: [PATCH] Implement uuid_version()

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Jose Luis Tallon <jltallon(at)adv-solutions(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>
Subject: Re: [PATCH] Implement uuid_version()
Date: 2019-07-13 15:13:36
Message-ID: alpine.DEB.2.21.1907131702230.22273@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Peter,

>> About doc: I'd consider "generation" instead of "generating" as a
>> secondary index term.
>
> We do use the "-ing" form for other secondary index terms. It's useful
> because the concatenation of primary and secondary term should usually
> make a phrase of some sort. The alternative would be "generation of",
> but that doesn't seem clearly better.

Ok, fine. I looked but did not find other instances of "generating".

>> 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.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-07-13 15:17:32 Re: Check-out mutable functions in check constraints
Previous Message Joe Conway 2019-07-13 13:38:06 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)