postgres login from command line code example Example: postgresql cli login psql -d mydb -U myuser -W psql -h myhost -d mydb -U myuser -W