How to export a PostgreSQL query output to a csv file
Modern syntax: COPY (SELECT * FROM …) TO ‘/tmp/filename.csv’ (FORMAT csv); So the 162 rows of my output table have been copied in the shell. How can I paste or move them to a csv file? The result is the CSV file. Open it with any spreadsheet program using matching delimiters. The manual: The default … Read more