Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PostgreSQL exist on OS X Mavericks?

I knew there was a version of PostgreSQL installed on OS X Mountain Lion and if you want to work with this database engine you must install a new version and make some changes (http://nextmarvel.net/blog/2011/09/brew-install-postgresql-on-os-x-lion /). I didn't do this at that time because it was not necessary for me.

Now I have my Mac with OS X Mavericks (clean install) and if I run psql -- version as can be seen in this article (http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x), the terminal tells me that there is no such command.

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

Does PostgreSQL get installed by default when I do a clean install of OS X Mavericks?

If i want to try PostgreSQL on Mavericks, do I just need to run brew install postgresql and it`d be OK?

Has anyone tried this?

Thank you very much.

like image 891
CristianOrellanaBak Avatar asked Oct 26 '13 20:10

CristianOrellanaBak


People also ask

Where is Postgres in macOS?

System: MAC OS X 10.9. 9.4) this is under the dir called /Library/PostgreSQL If you go there, open the folder named as the ver. of your PG and then go to the folder data you will find your DB.

How can I tell if Postgres is running on my Mac?

psql -c "SELECT 1" -d {dbname} > /dev/null || postgres -D /usr/local/var/postgres >postgres. log 2>&1 & if you want to check and start postgres in one go (handy for automation scripts).


2 Answers

Yes, it should be safe to brew install postgresql, provided brew doctor indicates no problems.

My preferred approach is always to leave OS X builtins untouched, and use Homebrew to install separate versions of everything I'd like to work with. I've tried using OS X builtins in the past, and things have a way of getting messy in a hurry, especially when updating OS X.

like image 157
Aaron Adams Avatar answered Oct 17 '22 04:10

Aaron Adams


For everyone who is looking for guide about how to install and configure postgres on the fresh Mavericks installation: http://marcinkubala.wordpress.com/2013/11/11/postgresql-on-os-x-mavericks/

I hope it will be helpful.

like image 44
Marcin Kubala Avatar answered Oct 17 '22 02:10

Marcin Kubala