Tabela kopiowania od SQL do CSV

Copy (Select * From foo) To '/tmp/test.csv' With CSV DELIMITER ',' HEADER;
Famous Flamingo