mirror of
https://github.com/postgres/postgres.git
synced 2025-06-08 22:02:03 +03:00
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.
This commit is contained in:
parent
6c00b2bbf7
commit
412a4295b5
@ -1214,8 +1214,12 @@ shdepDropOwned(List *roleids, DropBehavior behavior)
|
|||||||
Form_pg_shdepend sdepForm = (Form_pg_shdepend) GETSTRUCT(tuple);
|
Form_pg_shdepend sdepForm = (Form_pg_shdepend) GETSTRUCT(tuple);
|
||||||
ObjectAddress obj;
|
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;
|
continue;
|
||||||
|
|
||||||
switch (sdepForm->deptype)
|
switch (sdepForm->deptype)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user