amazon-redshift - 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
。
解决方案
撤销默认权限:
ALTER DEFAULT PRIVILEGES FOR USER "ted.mosby" IN SCHEMA tv_shows
REVOKE ALL ON TABLES FROM "ted.mosby";
您可以使用\ddp
inpsql
查看是否还有任何默认权限。
推荐阅读
- html - 如何在ionic 3中使脚覆盖页面的整个宽度
- asp.net - 是否可以防止在多行文本框中重复输入?
- android - 尝试在 onDestoryView() 之外保留 Fragment 视图的引用时发生内存泄漏
- python - 一个简单的单层感知器实现,用于具有 sigmoid 激活函数的二进制分类
- c# - 如何统一为不同的屏幕尺寸设置基于购物的 UI?
- python - 熊猫映射到数组字典
- rest - 使用 Bitbucket REST API 时出现 curl 错误
- c# - EF Core 更新导航属性但 FK 隐藏属性未更新
- html - HTML&CSS + Twitter Bootstrap:左侧的任何表单元素和右侧的按钮(行部分)
- httpclientfactory - 在 .Net Core 2.1 类库中使用 HttpClientFactory