psql command not found mac

QuestionsCategory: Questionspsql command not found mac
Chetan Kapoor Staff asked 1 year ago

psql command not found mac

1 Answers
Chetan Kapoor Staff answered 1 year ago

If you want to use command line tools with postgres app you need to set PATH variable see below.
Open your ~/.profile file and paste the file below.

export PATH=/Library/PostgreSQL/9.6/bin/:$PATH

After this you need to source the file or restart your terminal.
The above command is only for postgres version 9.6 if you update the version of postgresql you need to change the command accordingly.