summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAlvaro Herrera2012-07-03 19:18:40 +0000
committerAlvaro Herrera2012-07-03 19:18:40 +0000
commit6416895cc6b95636138338da7854fc1b27930726 (patch)
tree6eebf8040a257bf8635b6bf034c187901bb2f73f /src/include
parent5e59e6a6483ea9ec8149f3ca2a37959115216852 (diff)
Have REASSIGN OWNED work on extensions, too
Per bug #6593, REASSIGN OWNED fails when the affected role has created an extension. Even though the user related to the extension is not nominally the owner, its OID appears on pg_shdepend and thus causes problems when the user is to be dropped. This commit adds code to change the "ownership" of the extension itself, not of the contained objects. This is fine because it's currently only called from REASSIGN OWNED, which would also modify the ownership of the contained objects. However, this is not sufficient for a working ALTER OWNER implementation extension. Back-patch to 9.1, where extensions were introduced. Bug #6593 reported by Emiliano Leporati.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/commands/extension.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/commands/extension.h b/src/include/commands/extension.h
index 7fc8a927d35..f0847ff3fbe 100644
--- a/src/include/commands/extension.h
+++ b/src/include/commands/extension.h
@@ -45,4 +45,6 @@ extern char *get_extension_name(Oid ext_oid);
extern void AlterExtensionNamespace(List *names, const char *newschema);
+extern void AlterExtensionOwner_oid(Oid extensionOid, Oid newOwnerId);
+
#endif /* EXTENSION_H */