PostgreSQL 查看权限及 Access privileges 含义

PostgreSQL About 1,045 words

\z

Access privileges格式为grantee=privileges/grantor,即:被授予权限的角色=具体权限的缩写标识符/授予该权限的角色

arwdDxt
- aappend):insert,写入
- rread):select,查询
- wwrite):update,修改
- ddelete):delete,删除
- DDelete):truncate,清空(不是Drop
- xreferences):外键
- ttrigger):触发器

这里的cccccccccccccccc表,对于postgres用户来说拥有全部权限,对于t_usr用户来说只有读的权限。

postgres=# \z
                                               Access privileges
 Schema |              Name               |   Type   |     Access privileges     | Column privileges | Policies 
--------+---------------------------------+----------+---------------------------+-------------------+----------
 public | aaaaaaaaaaaaaaaaaaaa            | view     |                           |                   | 
 public | bbbbbbbbbb                      | view     |                           |                   | 
 public | cccccccccccccccc                | sequence | postgres=arwdDxt/postgres+|                   | 
        |                                 |          | t_usr=r/postgres          |                   |
Views: 160 · Posted: 2025-09-26

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Today In History
Browsing Refresh