cleanup psql calls