What is the easiest way to save PL/pgSQL output from a PostgreSQL database to a CSV file?
I\'m using PostgreSQL 8.4 with pgAdmin III and PSQL plugin where I run que
To Download CSV file with column names as HEADER use this command:
Copy (Select * From tableName) To '/tmp/fileName.csv' With CSV HEADER;