Correct way to install psql without full Postgres on macOS?

Vitaly Zdanevich picture Vitaly Zdanevich · Jun 20, 2017 · Viewed 53.6k times · Source

Official page do not mention such case. But many users need only psql without a local database (I have it on AWS). Brew do not have psql.

Answer

PPS picture PPS · Apr 6, 2018

You could also use homebrew to install libpq.

brew install libpq

This would give you psql, pg_dump and a whole bunch of other client utilities without installing Postgres.

You then add the installation directory to your path. In my case, the directory location is:

/usr/local/Cellar/libpq/10.3/bin