diff options
| author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-10-03 12:22:41 -0300 |
|---|---|---|
| committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-10-03 12:28:33 -0300 |
| commit | bec6e6cdfaa8987e82c328bf72cdc30d517e09f1 (patch) | |
| tree | db301213bcf8c0248be3ebd634b8016d37788906 | |
| parent | 3e291cab0829f48215061a67cc07371cca3cf2e1 (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 814f1e789a8..228bbc3c279 100644 --- a/src/backend/catalog/pg_shdepend.c +++ b/src/backend/catalog/pg_shdepend.c @@ -1210,8 +1210,12 @@ shdepDropOwned(List *roleids, DropBehavior behavior) Form_pg_shdepend sdepForm = (Form_pg_shdepend) GETSTRUCT(tuple); 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) |
