Show roles and memberships.
Section: Connect and Inspect with psql
List roles
sql
sql
\duExplanation
Useful when checking login capability, superuser privileges, or group roles.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Connect and Inspect with psql