Import/Export CSV
Export table into CSV file
\copy table TO '<path>' CSV
\copy table(col1,col1) TO '<path>' CSV
\copy (SELECT...) TO '<path>' CSV
Import CSV file into table
\copy table FROM '<path>' CSV
\copy table(col1,col1) FROM '<path>' CSV
See also: Copy
Comments