User aren’t actually, “for the database”, they’re for cluster and are given different permissions to access databases. To list users \du
should do, but you need to be connected. Something like
psql template1 -c '\du'
from the command line prompt should do. (or \du
from psql prompt when you are connected to the database).