We've had several complaints about that tab-completion bug in the
Apple-supplied version of libedit, most recently here:
http://archives.postgresql.org/pgsql-bugs/2011-06/msg00119.php
I had a bug filed with Apple about that, and today I got some auto-mail
indicating they'd fixed that bug as of OS X 10.7 (Lion). I don't have
Lion installed here, but I grabbed the libedit sources from
www.opensource.apple.com and indeed it looks fixed. So, if any early
adopters want to try it out ...
regards, tom lane