What options exist to restore tab completion using libedit in PSQL on OS X Lion? It would appear that Apple have managed to get it utterly wrong with libedit again. The version shipped with Lion is apparently broken, and consequently tab completion doesn't work in psql (Discussion here). psql is one of the few tools that I tend to use directly from my macbook rather than on a vm and it would be lovely if it just worked. I've tried rlwrap and although it functions it doesn't support psql tab completion. I suppose I could install a new version of psql from source and link it directly against readline but I was wondering if:


...anyone had found a workaround of some sort
...it was even vaguely credible to consider building an updated version of libedit and replacing the system version?
Install macports, and then install the postgresql83 package.

sudo port install postgresql83

The macports psql works fine. Make sure you get it first on your path, e.g.:

PATH=/opt/local/lib/postgresql83/bin:$PATH