How to find users in PostgreSQL

In PostgreSQL, there is a system table called pg_user. You can run a query and get the information about these Users.

SELECT * FROM pg_user;

The pg_user table contains the following columns:

ColumnExplanation
usenameUser name (ie: postgres, techonthenet, etc)
usesysidUser ID (number assigned by PostgreSQL)
usecreatedbBoolean value indicating whether user can create databases (t or f)
usesuperBoolean value indicating whether user is a superuser (t or f)
usecatupdBoolean value indicating whether user can update system catalogs (t or f)
usereplBoolean value indicating whether user can initiate replication (t or f)
passwdPassword for user displayed as ********
valuntilTime when password will expire
useconfigSession defaults for run-time configuration variables

Comments

Popular posts from this blog

[FATAL] [DBT-10503] Template file is not specified

Resolving ORA-10635 and ORA-39171 Errors During BLOB Tablespace Maintenance

How to resolve RMAN-06035: wrong version of recover.bsq, expecting 11.2.0.4, found 11.2.0.2