ITPub博客

首页 > IT职业 > IT职场 > 如何查看postgresql用户权限

如何查看postgresql用户权限

IT职场 作者:petterchx 时间:2021-09-11 10:25:19 0 删除 编辑

1、查看某用户的表权限

select * from information_schema.table_privileges where grantee='user_name';

2、查看usage权限表

select * from information_schema.usage_privileges where grantee='user_name';

3、查看存储过程函数相关权限表

select * from information_schema.routine_privileges where grantee='user_name';

4、建用户授权

create user user_name;
alter user user_name with password '';
alter user user_name with CONNECTION LIMIT  20;#连接数限制

Python学习网,大量的免费PostgreSQL入门教程,欢迎在线学习!

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4606/viewspace-2835167/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-10-24

  • 博文量
    131
  • 访问量
    30134