I am working on OS X El Capitan version 10.11.3 I downloaded the Postgres app and ran the app.
The elephant icon on the top says Version 9.6.1.0(9.6.1.0)
When I click on 'Open psql' I get the following output on my terminal.
$ '/Applications/Postgres.app/Contents/Versions/9.6/bin'/psql -p5432
psql: FATAL: role <username> does not exist
where is my username. As far as I understand the app should create a role with my username and no password.
I tried doing:
psql -h localhost -U <username>
which gave the same error.
Following are the various output I got for trying out answers posted on SO.
$ which psql
/Applications/Postgres.app/Contents/Versions/latest/bin/psql
After searching a bit more I ran the following command:
psql -h localhost -U postgres
postgres=#
The postgres shell opened up. Can anyone explain what's happening?