提交 fe3b5eb0 编写于 作者: A Alvaro Herrera

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.
上级 e1be1df5
......@@ -1217,8 +1217,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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册