Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just installed PostGreSQL on my Mac. I'm sure of that since I can open up the pqsl shell just fine via clicking on

enter image description here

However, when I try calling postgres -D /usr/local/pgsql/data in terminal to start the database server, I get that the postgres command is not found.

Why is that? I feel that I might be missing something or forgetting to do something.

share|improve this question

1 Answer 1

You need to add postgres executable to your path. If it's in /usr/local/pgsql/bin you can add it for all users by doing the following:

sudo nano /etc/paths

To the bottom of file add a new line:

/usr/local/pgsql/bin
share|improve this answer
    
Oh interesting, your answer led me to what was wrong. Mac OSX lion seemed to rename postgres to postgres_real. –  David Faux Oct 31 '13 at 8:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.