我正在尝试删除以前是具有相同名称“xyz”的架构所有者的角色“xyz”。我如下更改了架构所有权,并运行重新分配的所有权以防万一(尽管所有表都是由具有超级用户权限的不同用户创建的)。所以我运行所有这些:
alter schema xyz owner to postgres;
reassign owned by xyz to postgres;
alter default privileges in schema seeds revoke all on tables from xyz cascade;
alter default privileges in schema seeds revoke all on sequences from xyz cascade;
alter default privileges in schema seeds revoke all on functions from xyz cascade;
并且仍然收到错误:
drop role xyz;
ERROR: role "xyz" cannot be dropped because some objects depend on it
DETAIL: owner of default privileges on new relations belonging to role xyz in schema xyz
也仅供参考:
postgres=# \du rsi
List of roles
Role name | Attributes | Member of
-----------+----------------+-----------
rsi | No inheritance | {}
我错过了什么?任何帮助,将不胜感激!谢谢!!