Best Way To Install Postgres On Mac For Database Development

Posted By admin On 16.02.22
Active5 years, 6 months ago

How To Install Postgres On Windows

I'm trying to install hstore in Postgres on Mac OSX 10.9, but I'm having major troubles with it. First I had some trouble getting psql to work after installing postgresql using brew, so I finally installed Postgres using postgresql.app. After that I logged into psql, created a database and tried creating the hstore extension using CREATE EXTENSION hstore;, which throws me an error saying ERROR: could not open extension control file '/usr/local/Cellar/postgresql/9.3.2/share/postgresql/extension/hstore.control': No such file or directory.

Best Way To Install Postgres On Mac For Database Development

I guess that path refers to a brew install, which doesn't exist (I uninstalled the brew version). Would anybody know how I can still install the hstore extension now?

I'm rather lost here, so all tips are welcome!

kramer65

Postgres.app is a full-featured PostgreSQL installation packaged as a standard Mac app. It includes everything you need to get started: we’ve even included popular extensions like PostGIS for geo data and plv8 for JavaScript. Appears 'the way' to install it, if you want to use hombrew, is this: $ brew install postgresql. Then psql will be available to you (it also installs a local Postgres server/database, but you don't have to use that if all you want is the client).

kramer65How to install postgres on ubuntu
6352 gold badges10 silver badges32 bronze badges

1 Answer

You didn't actually uninstall the Brew version fully. The PostgreSQL you are connected to is using /usr/local/Cellar/postgresql/9.3.2/share/postgresql/ as $libdir, which is a Homebrew path.

I'd say you just unlinked it from /usr/local, you didn't really uninstall it, and it's still running quite happily.

Even if you actually deleted it, on Mac OS X (like most OSes except Windows) you can delete a file that's still open - so PostgreSQL can potentially be still running, even though the files have been deleted. The OS will really delete them when they are closed.

Craig RingerCraig Ringer
2,4421 gold badge12 silver badges16 bronze badges
Best Way To Install Postgres On Mac For Database Development

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