I\'m using psql\'s \\dt to list all tables in a database and I need to save the results.
\\dt
What is the syntax to export the results of a psql command to a
COPY tablename TO '/tmp/output.csv' DELIMITER ',' CSV HEADER;
this command is used to store the entire table as csv