How to save PostgreSQL psql query output to a file

Published --