psql (PostgreSQL) 8.1.23
contains support for command-line editing
