pgsql: Repair ALTER EXTENSION ... SET SCHEMA.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Repair ALTER EXTENSION ... SET SCHEMA.
Дата
Msg-id E1s56Ut-000B8E-Jn@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Repair ALTER EXTENSION ... SET SCHEMA.

It turns out that we broke this in commit e5bc9454e, because
the code was assuming that no dependent types would appear
among the extension's direct dependencies, and now they do.

This isn't terribly hard to fix: just skip dependent types,
expecting that we will recurse to them when we process the parent
object (which should also be among the direct dependencies).
But a little bit of refactoring is needed so that we can avoid
duplicating logic about what is a dependent type.

Although there is some testing of ALTER EXTENSION SET SCHEMA,
it failed to cover interesting cases, so add more tests.

Discussion: https://postgr.es/m/930191.1715205151@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9effc4608e1f6d19546a0e0f64320f4b0dd10c3c

Modified Files
--------------
src/backend/commands/alter.c                       | 14 ++---
src/backend/commands/extension.c                   |  2 +-
src/backend/commands/tablecmds.c                   |  7 ++-
src/backend/commands/typecmds.c                    | 69 +++++++++++++++++-----
src/include/commands/typecmds.h                    |  4 +-
src/test/modules/test_extensions/Makefile          |  2 +
.../test_extensions/expected/test_extensions.out   | 38 ++++++++++++
src/test/modules/test_extensions/meson.build       |  2 +
.../test_extensions/sql/test_extensions.sql        | 10 ++++
.../test_extensions/test_ext_set_schema--1.0.sql   | 17 ++++++
.../test_extensions/test_ext_set_schema.control    |  3 +
11 files changed, 141 insertions(+), 27 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: pgsql: doc PG 17 relnotes: Fixes from jian he
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: doc PG 17 relnotes: Visual Studio clarification