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:

  1. ...anyone had found a workaround of some sort
  2. ...it was even vaguely credible to consider building an updated version of libedit and replacing the system version?

1 Answer 1


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.:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .