| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, 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>, Jose Luis Tallon <jltallon(at)adv-solutions(dot)net> | 
| Subject: | Re: [PATCH] Implement uuid_version() | 
| Date: | 2019-07-04 15:12:26 | 
| Message-ID: | 5b2c6230-e0b9-59a9-b945-c7d38fdae296@2ndquadrant.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On 2019-07-02 17:09, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> On 2019-06-30 14:50, Fabien COELHO wrote:
>>> I'm wondering whether pg_random_uuid() should be taken out of pgcrypto if 
>>> it is available in core?
> 
>> That would probably require an extension version update dance in
>> pgcrypto.  I'm not sure if it's worth that.  Thoughts?
> 
> We have some previous experience with this type of thing when we migrated
> contrib/tsearch2 stuff into core.  I'm too caffeine-deprived to remember
> exactly what we did or how well it worked.  But it seems advisable to go
> study that history, because we could easily make things a mess for users
> if we fail to consider their upgrade experience.
I think in that case we wanted users of the extension to transparently
end up using the in-core code.  This is not the case here: Both the
extension and the proposed in-core code do the same thing and there is
very little code duplication, so having them coexist would be fine in
principle.
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.
-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2019-07-04 15:17:17 | Re: [PATCH] Implement uuid_version() | 
| Previous Message | Peter Eisentraut | 2019-07-04 15:02:59 | Re: "long" type is not appropriate for counting tuples |