Difference between revisions of "List users and roles: \du"

From wikieduonline
Jump to navigation Jump to search
Line 13: Line 13:
  
  
SELECT rolname FROM [[pg_roles]];
+
<code> SELECT rolname FROM [[pg_roles]]; </code>
  
  

Revision as of 12:26, 18 October 2021

\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: