PostgreSQL - 权限管理

2017-08-24  本文已影响0人  青鱼之鱼

DB 级别

GRANT CONNECT ON DATABASE database TO user;
GRANT CREATE ON DATABASE database TO user;

Schema 级别

GRANT USAGE ON SCHEMA schema TO user;
GRANT CREATE ON SCHEMA schema TO user;

Table 级别

GRANT SELECT ON TABLE table TO user;
GRANT UPDATE ON TABLE table TO user;
GRANT DELETE ON TABLE table TO user;
GRANT INSERT ON TABLE table TO user;
GRANT TRUNCATE ON TABLE table TO user;
GRANT TRIGGER ON TABLE table TO user;
GRANT REFERENCES ON TABLE table TO user;

Column 级别

GRANT SELECT(column) ON TABLE table TO user;
GRANT INSERT(column) ON TABLE table TO user;
GRANT UPDATE(column) ON TABLE table TO user;
GRANT REFERENCES(column) ON TABLE table TO user;
上一篇下一篇

猜你喜欢

热点阅读