unlimited psql history via http://craigkerstiens.com/2013/02/13/How-I-Work-With-Postgres/