导出查询结果

最近更新时间: 2025-02-18 16:02:00

  • 复制
    复制成功
postgres=# copy (select f2,f3 from public.t order by f3) to  '/data/pgxz/t.txt';
COPY 3
postgres=# \! cat /data/pgxz/t.txt
        2017-10-28 18:24:05.643102
pgxz    2017-10-28 18:24:05.645691
Tbase   \N
postgres=# 
#查询可以是任何复杂查询