Re: Error Creating pgcrypto Extension

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Mark Hill <Mark(dot)Hill(at)sas(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>, Phil Rau <Phil(dot)Rau(at)sas(dot)com>, Michael King <Michael(dot)King(at)sas(dot)com>, Ashley Stephens <Ashley(dot)Stephens(at)sas(dot)com>
Subject: Re: Error Creating pgcrypto Extension
Date: 2026-09-17 21:11:52
Message-ID: CAKFQuwaCnT854sPzRJGnO83ReCtKoi9DcFxj0cxBe617uZbxaA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 17, 2026 at 3:25 PM Mark Hill <Mark(dot)Hill(at)sas(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2026-09-18 00:05:02 Re: Error Creating pgcrypto Extension
Previous Message Mark Hill 2026-09-17 20:24:36 Error Creating pgcrypto Extension