Use psql; it provides all the command-line options you need.
-- Scott Ribescott_ribe(at)killerbytes(dot)comhttp://www.killerbytes.com/(303) 722-0567 voice