Using Command Line Tools with Postgres.app (original) (raw)

Configure your $PATH

Postgres.app includes many command line tools. If you want to use them, you must configure the $PATH variable.

The easiest way to configure your PATH is to execute the following command:

sudo mkdir -p /etc/paths.d &&
echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp

Don’t forget to close the Terminal window and open a new one for changes to take effect.

Of course, you could also just edit your .profile file instead.

Whatever method you use, you can check if the path is set up correctly by typing which psql.

Tools provided by Postgres.app

The following tools come with Postgres.app:

Man pages

Postgres.app ships with man pages. If you’ve configured your PATH as described above, just type man psql to read the official docs.