首页 > 解决方案 > Redshift:无法删除用户所有者默认权限

问题描述

我试图从我的数据库中删除一个用户,但我收到一个错误:

user "ted.mosby" cannot be dropped because some objects depend on it
Detail: owner of default privileges on new relations belonging to user ted.mosby in schema tv_shows

如何修复此错误并将用户从我的数据库中删除?

我已经更改了所有者,并且已经撤销了所有权限ted.mosby

标签: amazon-redshift

解决方案


撤销默认权限:

ALTER DEFAULT PRIVILEGES FOR USER "ted.mosby" IN SCHEMA tv_shows
   REVOKE ALL ON TABLES FROM "ted.mosby";

您可以使用\ddpinpsql查看是否还有任何默认权限。


推荐阅读