When I first started, I was looking for a free graphical client. I asked my more seasoned coworker what he used. He said, psql.
Skeptically I tried, and after a little while, I prefer nothing else. I was already sold on vi, so it's not much surprise.
I use the \i command a lot, to run SQL commands from a file. That gives me a chance to nicely organize and indent complex queries, and tweak them as needed (with vi, of course).
That's also I do migrations. I script them in a long SQL file (surrounded by BEGIN and ROLLBACK). When it runs satisfactorily, I change ROLLBACK to COMMIT and run it again.