天天看點

postgresql建立隻讀賬号

postgresql建立隻讀賬号:

# su - postgres

$ psql

# \c icinga2;

# create user aa with password 'xxx';

# grant select on all tables in schema public to aa;  (對現有表生效)

# alter default privileges in schema public grant select on tables to icuser_ro; (對未來的新加表生效)

#\q

本文轉自linux部落格51CTO部落格,原文連結http://blog.51cto.com/yangzhiming/1978480如需轉載請自行聯系原作者

yangzhimingg

繼續閱讀