> Can anybody tell me how to enable autocomplete and history in psql.
Make sure your platform has the readline libraries installed.
Under an RPM based Linux, try
$ rpm -qa | grep readline
You can also under Linux try $ ldd psql
and see if it finds readline.so as one of its dependencies.
I can't help you on Windows or Mac.
Hope this helps,
Stuart.