postgresql - 查看模式权限 [英] postgresql - view schema privileges
本文介绍了postgresql - 查看模式权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以运行查询来显示当前分配给特定架构的权限?
Is there a query I can run to show currently assigned privileges on a particular schema?
即像这样分配的权限:
GRANT USAGE ON SCHEMA dbo TO MyUser
我试过了
SELECT *
FROM information_schema.usage_privileges;
但这只会返回对内置 PUBLIC 角色的授权.相反,我想查看哪些用户已被授予对各种架构的权限.
but this only returns grants to the built-in PUBLIC role. Instead, I want to see which users have been granted privileges on the various schema.
注意:我实际上使用的是 Amazon Redshift 而不是纯 PostgreSQL,但如果在 Amazon Redshift 中无法实现,我将接受纯 PostgreSQL 答案.(虽然我怀疑是)
Note: I'm actually using Amazon Redshift rather than pure PostgreSQL, although I will accept a pure PostgreSQL answer if this is not possible in Amazon Redshift. (Though I suspect it is)
推荐答案
in console util psql:
in console util psql:
dn+
会告诉你
Name | Owner | Access privileges | Description
这篇关于postgresql - 查看模式权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文