| ADMIN 角色名称 [, 。。。]
| USER 角色名称 [, 。。。]
| SYSID uid
postgres=# \h drop user
命令: DROP USER
描述: 移除一个数据库成员
语法:
DROP USER [ IF EXISTS ] 名称 [, 。。。]
查询用户:
# 用户 postgres 登录后
创建用户:命令行居然显示为 “CREATE ROLE”
# create user user1;
CREATE ROLE
查询pg_roles视图:多了一个 user1角色
postgres=# select * from pg_roles;
rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolconnlimit | rolpassword | rolvaliduntil | rolbypassrls | rolconfig | oid
----------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+-------------+---------------+--------------+-----------+-------
pg_signal_backend | f | t | f | f | f | f | -1 | ******** | | f | | 4200
user1 | f | t | f | f | t | f | -1 | ******** | | f | | 16434
postgres | t | t | t | t | t | t | -1 | ******** | | t | | 10
pg_read_all_stats | f | t | f | f | f | f | -1 | ******** | | f | | 3375
pg_monitor | f | t | f | f | f | f | -1 | ******** | | f | | 3373
pg_read_all_settings | f | t | f | f | f | f | -1 | ******** | | f | | 3374