Use the psql
shell and:
\deu[+] [PATTERN]
such as:
postgres=# \deu+
List of user mappings
Server | User name | FDW Options
--------+-----------+-------------
(0 rows)
And for all users:
postgres=# \du
List of roles
Role name | Attributes | Member of
------------+------------------------------------------------+-----------
chpert.net | | {}
postgres | Superuser, Create role, Create DB, Replication | {}
Also such as MySQL, you can do :
$ psql -c "\du"
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
chpert | | {}
postgres | Superuser, Create role, Create DB, Replication | {}
test | | {}