Installed Postgres.app but it won't work

I just installed Postgres.app on my Mac but it won't work properly. I finished the installation and the app icon is on the menu bar and it says it is listening on port 5432, however, that is what happens if I try to run it from the command-line:

~ $ psql
zsh: correct 'psql' to 'sl' [nyae]? n
zsh: command not found: psql

I had previously installed PostgreSQL via Homebrew but removed it before installing Postgres.app. I am running Mac OS X Lion.

I appreciate any help, I really want to have PostgreSQL running on my machine.

Answers


The psql binary for Postgres.app is inside the application bundle and you'll have to add the appropriate directory to your PATH. From the fine manual:

Command-Line Tools

[...]

PostgreSQL ships with a constellation of useful binaries, like pg_dump or pg_restore, that you will likely want to use. Go ahead and add the /bin directory that ships with Postgres.app to your PATH (preferably in .profile, .bashrc, .zshrc, or the like to make sure this gets set for every Terminal session):

PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"

So adjust your PATH setting in your zsh config files to include the Contents/MacOS/bin directory inside your Postgres.app bundle.


Need Your Help

In the WinForms DevExpress XtraWizard control, how can one hide the back button?

c# .net winforms devexpress

I know that if I set the WizardStyle of an XtraWizard control to WizardAero, it will remove or hide the back button from the first page instead of simply disabling it, as can be seen here. I want ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.