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)
推荐答案
在控制台实用程序psql中:
in console util psql:
\dn+
将显示
Name | Owner | Access privileges | Description
这篇关于PostgreSQL-查看架构权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文