diff options
author | Tom Lane | 2024-05-09 16:19:43 +0000 |
---|---|---|
committer | Tom Lane | 2024-05-09 16:19:52 +0000 |
commit | 9effc4608e1f6d19546a0e0f64320f4b0dd10c3c (patch) | |
tree | b0c4d38060d95ee3b4a7cd12368b531520e9d433 /src/include/commands | |
parent | d82ab9fc31aa62d94c26d7df98e65c6ceaadb01f (diff) |
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/[email protected]
Diffstat (limited to 'src/include/commands')
-rw-r--r-- | src/include/commands/typecmds.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h index c378f9cd4f3..e1b02927c4b 100644 --- a/src/include/commands/typecmds.h +++ b/src/include/commands/typecmds.h @@ -50,9 +50,11 @@ extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId); extern ObjectAddress AlterTypeNamespace(List *names, const char *newschema, ObjectType objecttype, Oid *oldschema); -extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, ObjectAddresses *objsMoved); +extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, bool ignoreDependent, + ObjectAddresses *objsMoved); extern Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid, bool isImplicitArray, + bool ignoreDependent, bool errorOnTableType, ObjectAddresses *objsMoved); |