postgresql后期给开发建表的权限问题
生活随笔
收集整理的這篇文章主要介紹了
postgresql后期给开发建表的权限问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、切換到指定數據庫
\c axyh_360p_hunan_mobile_security_manage View Code2、回收權限
1 revoke connect on database axyh_360p_hunan_mobile_security_manage from public; 回收權限3、設置授權后的權限
grant對以及在數據庫的表進行授權
alter default 對新建的表進行授權延續
1 alter default privileges for user bd_zhangranran in schema public grant insert,select,update,delete,references,trigger on tables to bd_weidubin; 2 運維人員可能會進行重新導表,所以postgres用戶也要進行授權延續操作 3 alter default privileges for user postgres in schema public grant insert,select,update,delete,references,trigger on tables to bd_weidubin; 授權延續后期zhangjun用戶在publi模式下建的表具有insert,select,update,delete,references,trigger權限。grant是對當時及以前的。alter default是對之后的
4、授予連接權限
1 grant connect on database axyh_360p_hunan_mobile_security_manage to bd_miaoyongchao; 授予連接權限?
連接文檔:
https://blog.csdn.net/wanghai__/article/details/6337570
權限文檔:
http://www.freeoa.net/osuport/db/the-postgres-privileges_3112.html
轉載于:https://www.cnblogs.com/charon2/p/11314751.html
總結
以上是生活随笔為你收集整理的postgresql后期给开发建表的权限问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Centos7 Minimal 版安装后
- 下一篇: mysql权限问题