Re: Can't move extension out of pg_catalog
| От | Tom Lane |
|---|---|
| Тема | Re: Can't move extension out of pg_catalog |
| Дата | |
| Msg-id | 2507.1339789795@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Can't move extension out of pg_catalog (Daniele Varrazzo <daniele.varrazzo@gmail.com>) |
| Список | pgsql-bugs |
Daniele Varrazzo <daniele.varrazzo@gmail.com> writes:
> After moving an extension into the pg_catalog schema, it seems
> impossible to move it somewhere else:
> test=# create extension ltree;
> CREATE EXTENSION
> test=# alter extension ltree set schema pg_catalog;
> ALTER EXTENSION
> test=# alter extension ltree set schema public;
> ERROR: cannot remove dependency on schema pg_catalog because it is a
> system object.
Yeah, this is an implementation restriction that is unlikely to get
changed anytime soon. The problem is that moving the extension's
objects into pg_catalog results in dropping all their namespace
dependencies (since pg_catalog is a pinned object) and then there
is no way to resurrect that data if we want to move them someplace else.
See changeDependencyFor() in catalog/pg_depend.c.
Possibly it would be better to disallow this ALTER in both directions,
ie remove the support for the "drop the dependency" case in
changeDependencyFor().
regards, tom lane
В списке pgsql-bugs по дате отправления: