基本上什么是trino/presto中的蜂巢查询。
show role grant user <username>;发布于 2022-07-08 16:35:38
我们可以从information_schema获得信息,这是不言自明的,但我找不到关于这个系统定义模式的文档。
SELECT *
FROM information_schema.role_authorization_descriptors
WHERE grantee = 'a_user';更有用的查询是检查用户是否有访问表的权限。
SELECT *
FROM information_schema.table_privileges
WHERE table_schema = 'a_schema'
AND table_name = 'a_table'
AND privilege_type = 'SELECT'
AND (grantee = 'a_user' OR grantee IN (SELECT role_name
FROM information_schema.role_authorization_descriptors
WHERE grantee = 'a_user'));https://stackoverflow.com/questions/72905220
复制相似问题