Wednesday, December 3, 2008

PostgreSQL on OS X

PostgreSQL is one of my favorite database systems, and it's maybe the best open source database there is. Obviously for production, I'd run in on RHEL, and installing's a piece of cake with some yum magic. But for development purposes, a local database is a must.

Well, there are several ways to install on OS X. But easy is great, and Enterprise DB is kind enough to maintain an installer. It'll prompt you for the installation location (including data), the administrative password, and the port number (defaults to 5432). The installer will even configure PostgreSQL to start automatically (although you can change that if you want).

And luckily, the PostgreSQL JDBC driver is in the Maven repositories (even the JBoss Maven 2 repository). That makes using JDBC a cinch:
And of course the 8.3 manual (with comments). Now, we're all set.

Oh, and the installer also adds some nice OS X applications for starting, stopping, restarting, and administering databases. Just look under /Applications/PostgreSQL 8.3 (or the appropriate version).

1 comment:

Bob said...

I am also a big fan and user of the OS X version of Postgres Plus provided by EnterpriseDB via the advanced installer we call StackBuilder. Inside the distribution you will find PostgreSQL, pgAdmin, PL/Java and the PL/pgSQL debugger plugin. This is maintained by Dave Page, a terrific PostgreSQL developer who has done a great deal to help make the OS X version of the DBMS available. Enjoy.