PostgreSQL 表和列權限解讀
http://www.postgres.cn/docs/10/catalogs.html
postgres=# create user cmft with ENCRYPTED PASSWORD 'cmrh1875!';
CREATE ROLE
postgres=# create user cmrh with ENCRYPTED PASSWORD 'cmrh1875!';
CREATE ROLE
--查看用戶儲存處元數據
postgres=# select * from pg_user;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
----------+----------+-------------+----------+---------+--------------+----------+----------+-----------
postgres | 10 | t | t | t | t | ******** | |
cmft | 16385 | f | f | f | f | ******** | |
cmrh | 16386 | f | f | f | f | ******** | |
(3 rows)
--角色儲存處
postgres=# select * from pg_roles ;
rolname | rolsup