PostgreSQL中的权限显示

我们在PostgreSQL中使用\d命令,会有一个Access Privilieges的列

该列的含义如下

rolename=xxxx -- privileges granted to a role
        =xxxx -- privileges granted to PUBLIC

            r -- SELECT ("read")
            w -- UPDATE ("write")
            a -- INSERT ("append")
            d -- DELETE
            D -- TRUNCATE
            x -- REFERENCES
            t -- TRIGGER
            X -- EXECUTE
            U -- USAGE
            C -- CREATE
            c -- CONNECT
            T -- TEMPORARY
      arwdDxt -- ALL PRIVILEGES (for tables, varies for other objects)
            * -- grant option for preceding privilege

        /yyyy -- role that granted this privilege

其中需要注意的是PUBLIC这个特殊的角色。

按照文档的说法PUBLIC这个角色是指数据库中所有的角色,包括当前没有,以后创建的出的新角色。


你可能感兴趣的:(访问权限,PostgreSQL)