参考文章
1.https://www.cnblogs.com/zhoujinyi/p/10939715.html
2.https://www.cnblogs.com/lijiaman/p/16558877.html
具体实操
创建一个可以登录的用户jack, 且登陆密码是jack@123
CREATE USER jack LOGIN with PASSWORD 'jack@123'
授予jack连接数据库test_db的权限
grant connect on database test_db to jack
单表授权:授权jack用户可以访问schema为public的jack表
grant select,insert,update,delete on public.jack to jack;
schema所有表授权查权限,其他不授予:
grant select on all tables in schema public to jack;
schema所有表授权增删改查权限:
grant select,insert,update,delete on all tables in schema public to zjy;
标签:grant,用户,select,PG,权限,public,jack,schema
From: https://www.cnblogs.com/huangshiyi/p/18040579