diff options
author | Alvaro Herrera | 2012-10-03 15:22:41 +0000 |
---|---|---|
committer | Alvaro Herrera | 2012-10-03 15:28:17 +0000 |
commit | 3a937bf72f25c5c5f1ed6588a2ccf4be250306dc (patch) | |
tree | 9b84f24cf67ff45bfac2624ca4d8354f0f63c24f | |
parent | 43dfc5cac38b41365f512e237e12572f180b2883 (diff) |
REASSIGN OWNED: consider grants on tablespaces, too
Apparently this was considered in the original code (see commit
cec3b0a9) but I failed to notice that such entries would always be
skipped by the database check at the start of the loop.
Per bugs #7578 by Nikolay, #6116 by tushar.qa@gmail.com.
-rw-r--r-- | src/backend/catalog/pg_shdepend.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c index 8aa9a6f6fa6..02e8d7c62e5 100644 --- a/src/backend/catalog/pg_shdepend.c +++ b/src/backend/catalog/pg_shdepend.c @@ -1185,8 +1185,12 @@ shdepDropOwned(List *roleids, DropBehavior behavior) InternalGrant istmt; ObjectAddress obj; - /* We only operate on objects in the current database */ - if (sdepForm->dbid != MyDatabaseId) + /* + * We only operate on shared objects and objects in the current + * database + */ + if (sdepForm->dbid != MyDatabaseId && + sdepForm->dbid != InvalidOid) continue; switch (sdepForm->deptype) |