postgres outfile

postgres "select into outfile" == use \copy meta-command, e.g.\copy (SELECT * FROM tbl) TO '/tmp/result.csv' WITH CSV