List users and roles: \du

From wikieduonline
Revision as of 12:26, 18 October 2021 by Chmod15 (talk | contribs)
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: