美文网首页
PostgreSQL - 权限管理

PostgreSQL - 权限管理

作者: 青鱼之鱼 | 来源:发表于2017-08-24 10:32 被阅读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;
    

    相关文章

      网友评论

          本文标题:PostgreSQL - 权限管理

          本文链接:https://www.haomeiwen.com/subject/jpbsdxtx.html