Semi-related: Has anyone had issues with psql wrapping long lines incorrectly? Specifically it starts overwriting the current line. I'm using zsh on OS X using the default terminal, though the behavior also appears when SSHing to a remote server which uses bash.
I found this: http://stackoverflow.com/questions/2024884/commandline-overw... but it didn't seem to help.