Re: [PATCH] Implement uuid_version()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>,
pgsql-hackers <pgsql-hackers@postgresql.org>,
Andres Freund <andres@anarazel.de>,
Robert Haas <robertmhaas@gmail.com>, David Fetter <david@fetter.org>,
Jose Luis Tallon <jltallon@adv-solutions.net>
Date: 2019-07-04T15:17:17Z
Lists: pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes: > I think the alternatives are: > 1. We keep the code in both places. This is fine. There is no problem > with having the same C function or the same SQL function name in both > places. > 2. We remove the C function from pgcrypto and make an extension version > bump. This will create breakage for (some) current users of the > function from pgcrypto. > So option 2 would ironically punish the very users we are trying to > help. So I think just doing nothing is the best option. Hm. Option 1 means that it's a bit unclear which function you are actually calling. As long as the implementations behave identically, that seems okay, but I wonder if that's a constraint we want for the long term. A possible option 3 is to keep the function in pgcrypto but change its C code to call the core code. regards, tom lane
Commits
-
Add gen_random_uuid function
- 5925e5549890 13.0 landed
-
Add a 64-bit hash function for type hstore.
- eb6f29141bed 12.0 cited