agora inbox for pgsql-general@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Mark Hill <Mark.Hill@sas.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Cc: Phil Rau <Phil.Rau@sas.com>
Cc: Michael King <Michael.King@sas.com>
Cc: Ashley Stephens <Ashley.Stephens@sas.com>
Subject: Re: Error Creating pgcrypto Extension
Date: Thu, 17 Sep 2026 20:05:02 -0400
Message-ID: <947662.1789689902@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwaCnT854sPzRJGnO83ReCtKoi9DcFxj0cxBe617uZbxaA@mail.gmail.com>
References: <BYAPR05MB6632AA793C3F51F016FE752EEEB82@BYAPR05MB6632.namprd05.prod.outlook.com>
	<CAKFQuwaCnT854sPzRJGnO83ReCtKoi9DcFxj0cxBe617uZbxaA@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Sep 17, 2026 at 3:25 PM Mark Hill <Mark.Hill@sas.com> 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






view thread (9+ messages)  latest in thread

Message-ID: <947662.1789689902@sss.pgh.pa.us>
Permalink:  ../947662.1789689902@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/947662.1789689902@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, Mark.Hill@sas.com, pgsql-general@lists.postgresql.org, Phil.Rau@sas.com, Michael.King@sas.com, Ashley.Stephens@sas.com
  Subject: Re: Error Creating pgcrypto Extension
  In-Reply-To: <947662.1789689902@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox