Using Command Line Tools with Postgres.app
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:
- PostgreSQL:
clusterdbcreatedbcreatelangcreateuserdropdbdroplangdropuserecpginitdboid2namepg_archivecleanuppg_basebackuppg_configpg_controldatapg_ctlpg_dumppg_dumpallpg_receivexlogpg_resetxlogpg_restorepg_standbypg_test_fsyncpg_test_timingpg_upgradepgbenchpostgrespostmasterpsqlreindexdbvacuumdbvacuumlo - PROJ.4:
cs2csgeodinvgeodinvprojnad2binproj - GDAL:
gdal_contourgdal_gridgdal_rasterizegdal_translategdaladdogdalbuildvrtgdaldemgdalenhancegdalinfogdallocationinfogdalmanagegdalservergdalsrsinfogdaltindexgdaltransformgdalwarpnearblackogr2ogrogrinfoogrtindextestepsg - PostGIS:
pgsql2shpraster2pgsqlshp2pgsql
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.