Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7M6L-00000000L6f-2qPb for pgsql-general@arkaria.postgresql.org; Fri, 18 Sep 2026 00:05:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7M6K-00000006eus-1nIy for pgsql-general@arkaria.postgresql.org; Fri, 18 Sep 2026 00:05:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7M6K-00000006euj-0LcW for pgsql-general@lists.postgresql.org; Fri, 18 Sep 2026 00:05:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7M6I-00000000EDD-1ACl for pgsql-general@lists.postgresql.org; Fri, 18 Sep 2026 00:05:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 68I052nK947663; Thu, 17 Sep 2026 20:05:02 -0400 From: Tom Lane To: "David G. Johnston" cc: Mark Hill , pgsql-general , Phil Rau , Michael King , Ashley Stephens Subject: Re: Error Creating pgcrypto Extension In-reply-to: References: Comments: In-reply-to "David G. Johnston" message dated "Thu, 17 Sep 2026 16:11:52 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <947661.1789689902.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 17 Sep 2026 20:05:02 -0400 Message-ID: <947662.1789689902@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Thu, Sep 17, 2026 at 3:25=E2=80=AFPM Mark Hill wr= ote: >> We are trying to run this code in Postgres 18.6: >> *1) Should pgcrytpo=E2=80=941.3.sql be trying to create gen_random_uui= d() 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 compone= nts. Yeah. As of now, installing pgcrypto into pg_catalog is unsupported. >> *2) given what=E2=80=99s in pgcrypto.control should there be a pgcrypto= =E2=80=941.4.sql >> file?* > The pattern of a base full install and then incremental update scripts i= s > 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