Re: Error Creating pgcrypto Extension - Mailing list pgsql-general

From David G. Johnston
Subject Re: Error Creating pgcrypto Extension
Date
Msg-id CAKFQuwaCnT854sPzRJGnO83ReCtKoi9DcFxj0cxBe617uZbxaA@mail.gmail.com
Whole thread
In response to Error Creating pgcrypto Extension  (Mark Hill <Mark.Hill@sas.com>)
Responses Re: Error Creating pgcrypto Extension
List pgsql-general
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:
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA pg_catalog CASCADE;

 

which try to create the gen_random_uuid() function but since it already exists it throws an error.

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.


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.

David J.

pgsql-general by date:

Previous
From: Mark Hill
Date:
Subject: Error Creating pgcrypto Extension
Next
From: Tom Lane
Date:
Subject: Re: Error Creating pgcrypto Extension