"David G. Johnston" <[email protected]> writes:
> On Thu, Sep 17, 2026 at 3:25 PM Mark Hill <[email protected]> wrote:
>> We are trying to run this code in Postgres 18.6:
>> *1)  Should pgcrytpo—1.3.sql be trying to create gen_random_uuid() if/when
>> it already exists?*

> It's not expecting to be installed in the pg_catalog schema since it is an
> extension.  Extensions don't usually conditionally install their components.

Yeah.  As of now, installing pgcrypto into pg_catalog is unsupported.

>> *2) given what’s in pgcrypto.control should there be a pgcrypto—1.4.sql
>> file?*

> The pattern of a base full install and then incremental update scripts is
> supported.

Installing 1.3 and then updating to a hypothetical 1.4 wouldn't work
anyway in this scenario, because installing 1.3 would fail.

We could perhaps decide that pgcrypto doesn't need to provide
gen_random_uuid anymore; maybe that backwards-compatibility hack
has served its time.  But I'm not sure if removing the function
would break anybody.  If we did go that way, we'd need to provide
a 1.3-to-1.4 update script that drops the function, and also a
pgcrypto--1.4 install script that rolls up all the prior updates
so that it never tries to create gen_random_uuid in the first place.

On the whole, seeing that installing pgcrypto into pg_catalog has
not worked since v13 and there's been hardly any complaints about
that, I'm not sure that we should risk breaking working setups to
allow it.

                        regards, tom lane


Reply via email to