云数据库 GaussDB-查看系统表:查看数据库用户

时间:2023-11-01 16:22:49

查看数据库用户

通过PG_USER可以查看数据库中所有用户的列表,还可以查看用户ID(USESYSID)和用户权限。

1
SELECT * FROM pg_user; 
123456
 usename | usesysid | usecreatedb | usesuper | usecatupd | userepl |  passwd  | valbegin | valuntil |   respool    | parent | spacelimit | useconfig | nodegroup | tempspacelimit | spillspacelimit ---------+----------+-------------+----------+-----------+---------+----------+----------+----------+--------------+-------------+------------+-----------+-----------+----------------+----------------- roach   |       10 | t           | t        | t         | t       | ******** |          |          | default_pool |      0      |            |           |           |                | (1 row)
support.huaweicloud.com/distributed-devg-v2-opengauss/gaussdb-v5r2c10-0023.html