Re: CREATE EXTENSION not adding extension on second SCHEMA

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "gustavomilc(at)gmail(dot)com" <gustavomilc(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: CREATE EXTENSION not adding extension on second SCHEMA
Date: 2022-05-31 15:32:57
Message-ID: 184838.1654011177@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Tuesday, May 31, 2022, PG Doc comments form <noreply(at)postgresql(dot)org>
> wrote:
>> I'm trying to add an extension to two schemas that I have in my DB.

> It doesn’t work and isn’t documented as something that does work. I really
> don’t see a need to say you cannot install the same extension multiple
> times explicitly - the self-describing error seems sufficient.

The CREATE EXTENSION reference page says

"There must not be an extension of the same name already loaded."

and later

"Remember that the extension itself is not considered to be within any
schema: extensions have unqualified names that must be unique
database-wide. But objects belonging to the extension can be within
schemas."

I hardly see how we could make this any plainer.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Daniel Westermann (DWE) 2022-05-31 16:04:40 Re: Can we still dump version 7?
Previous Message Nikhil Shetty 2022-05-31 15:28:43 Fwd: Adding more detail to pg_upgrade documentation