COPY (SELECT foo, bar FROM baz) TO '/tmp/query.csv' (format csv, delimiter ';') -- 添加表头信息 copy res_users to '/tmp/res_user.csv' with csv header ;