show postgres users code example Example 1: postgresql list users postgres=# \du Example 2: postgresql get current user name SELECT current_user;