Comment
Comment by kmstout
psql. It's installed everywhere I need to use it, it reads from stdin, and it writes to stdout. It's often the case that I want to take a SQL query that I've developed, generalize it a bit, and use something like
in a shell script (probably wrapped in a function for convenience).