Re: [PATCH] Implement uuid_version() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Implement uuid_version()
Date
Msg-id 5b2c6230-e0b9-59a9-b945-c7d38fdae296@2ndquadrant.com
Whole thread Raw
In response to Re: [PATCH] Implement uuid_version()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Implement uuid_version()
List pgsql-hackers
On 2019-07-02 17:09, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: "long" type is not appropriate for counting tuples
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Implement uuid_version()