Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore
Date
Msg-id CAKFQuwYc20fBq9OwYCzi0bbCiSdB42Lxxm_aepC4AAg5DpjFKg@mail.gmail.com
Whole thread Raw
In response to Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore
List pgsql-bugs
On Wed, May 8, 2024 at 5:50 PM David G. Johnston <david.g.johnston@gmail.com> wrote:

Immaterial, they ignore @extschema@ already.


On a related note, our documentation says:

The target schema is determined by the schema parameter in the control file if that is given, otherwise by the SCHEMA option of CREATE EXTENSION if that is given, otherwise the current default object creation schema (the first one in the caller's search_path).

However:

cat testext--1.1.control
schema=pg_control

cat testext--1.0--1.1.sql
CREATE TABLE public.testtbl2(id text primary key);
INSERT INTO public.testtbl2 VALUES ('@extschema@');


postgres=# create extension testext;
CREATE EXTENSION
postgres=# alter extension testext update to '1.1';
ALTER EXTENSION
postgres=# select * from testtbl2;
   id  
--------
 public


So it actually comes from pg_catalog, not the control file.

David J.

n.b.: just realized I typo'd schema pg_catalog as pg_control, though as seen that doesn't change the tests at all.

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore
Next
From: "David G. Johnston"
Date:
Subject: Re: Upgrading an extension's extnamespace from user-specified to a defined schema breaks dump/restore