Re: Suggestion to reduce COPY command output to csv file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use this alternative:

\copy (SELECT col1, col2, col3... from cities) TO '/var/lib/pgsql/cities.csv' (DELIMITER ',', FORMAT 'csv', HEADER)

The list col1, col2, col3... should only contain names on necessary columns and not under any circumstances  the geometry column


-- 
Med venlig hilsen / Kind regards

Bo Victor Thomsen



Den 04-03-2020 kl. 19:38 skrev postggen2020 s:
\copy cities TO '/var/lib/pgsql/cities.csv' (DELIMITER ',', FORMAT 'csv', HEADER)

  






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux