It strikes me that we could possibly benefit from a 'psql --batch' option.
Thoughts?
The link between -qAtX and "batch" is not that fully obvious, especially the unaligned tuples-only part. If so, why not some -F <tab> as well?
q: quiet
Pretty much always wanted for a batch mode run of anything.
A: unaligned tuples
Because alignment is pretty much never useful when you're parsing result sets with scripting (splitting, cut, etc) and just makes everything harder. The alignment psql uses isn't fixed, after all.
t: tuples-only
Headers just make everything more annoying to parse, and force you to do extra work to skip them. If you're running batch code you know the headers because you used a column-list form SELECT, or should've. You're unlikely to be ingesting them and using them to split up the tuple anyway. I think this one is a bit more arguable than the first two, though, as I can at least think of some cases where you might want it.
X: skip .psqlrc
Reliable, portable scripted psql shouldn't be using the local .psqlrc IMO. It's likely to just break things in exciting ways. But I can see it being reasonable to require this option to be supplied separately and just document it as "recommended" with --batch.