美文网首页
pg(PostgreSQL) 查询账号的表权限

pg(PostgreSQL) 查询账号的表权限

作者: 饱饱想要的灵感 | 来源:发表于2022-11-21 16:43 被阅读0次
  1. 查询表权限分给了哪些账号
select * from information_schema.table_privileges  where table_name  like '表名';
  1. 查询账号有哪些表的权限
# 查账号所拥有的权限
select * from information_schema.role_table_grants where grantee='someone';
# 或者
select * from information_schema.table_privileges where grantee='someone';

相关文章

网友评论

      本文标题:pg(PostgreSQL) 查询账号的表权限

      本文链接:https://www.haomeiwen.com/subject/lsdnxdtx.html