How to list all users in PostgreSQL
By Flavio Copes
Learn how to list all users in PostgreSQL by running the du command in the psql interface, which also shows each role's attributes and group memberships.
~~~
From the psql interface, run the \du command:

This will give you the list of all users in the system, plus their role attributes and the list of role groups they are member of.
~~~
Related posts about database: