This post对于显示Redshift GRANTS非常有用,但不能在外部表/架构上显示GRANTS。
如何显示外部架构(和相对表)特权?
答案 0 :(得分:0)
由于在外部表中仅可以select
个数据,这足以检查对外部表的usage
权限:
SELECT schemaname, objectname, usename,
has_schema_privilege(usrs.usename, schemaname, 'usage') AS usage
FROM(
SELECT schemaname, tablename AS objectname, schemaname + '.' + tablename AS fullobj
FROM SVV_EXTERNAL_TABLES
) AS objs,(SELECT * FROM pg_user) AS usrs