postgresql 授权某个数据库的权限给test 账号 使该账号 只能操作指定DB 不能操作其他DB

来源:互联网 发布:bs聊天室源码详解 编辑:程序博客网 时间:2024/06/06 21:39
alter user test set default_transaction_read_only=on;
grant all on database crm_db to test;
grant select on all tables in schema public to test;     // 起作用的是这句 要进入crm_db 操作,在那个db环境执行就授哪个db的权





删除前撤销


revoke all on database crm_prod_myl from test;
revoke select on all tables in schema public from test;
0 0
原创粉丝点击