List users and roles: \du

From wikieduonline
Jump to navigation Jump to search
\du
\du+

List roles using \du command:

postgres=# \du
                                      List of roles
   Role name    |                         Attributes                         | Member of
----------------+------------------------------------------------------------+-----------
 YOUR_USER      | Create DB                                                  | {}
 postgres       | Superuser, Create role, Create DB, Replication, Bypass RLS | {}


SELECT rolname FROM pg_roles;


Related terms

See also

Advertising: