Debian shipped an unstable, crippled version of Postgres 8.4 in the Winter 2010/2011 release of 6.0 (aka Squeeze.) Postgres contributor, Peter Eisentraut confirms this on his blog. Read more about it here. So how do you fix this?
Luckily, Debian has packaged a new version of Postgres that will use the libreadline6 library if it has been installed instead of the inferior (but more open-licensed) libedit. Unfortunately, the new Postgres package is only currently available in Debian Backports so you’ll have to enable the backports repo first.
Once you’ve installed Postgres8.4 > r114 from backports, all you have to do is install readline:
sudo apt-get update && sudo apt-get install libreadline6