postgresql后期給開發建表的權限問題


1、切換到指定數據庫

\c axyh_360p_hunan_mobile_security_manage
View Code

2、回收權限

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM