Skip to content
FLAVIO COPES
flaviocopes.com
2026

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:

List all users in PostgreSQL

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.

Tagged: Database ยท All topics
~~~

Related posts about database: