Hi, thanks for the wiki link.
I'm using Postgrees 9.5.2, running on Debian 8.4
I have a csv file with all columns quoted, even null values.
Following the documentation, I wrote this COPY FROM command:
COPY test_copy FROM '/mnt/disk1/files/test_file.csv' with csv header delimiter ';' force_null date_column, date_column2, date_column3, date_column4, date_column5 encoding 'latin1';
And received this error message:
ERROR: syntax error at or near "force_null"
LINE 1: ...test_file.csv' with csv header delimiter ';' force_null...
To fix the error, I had to replace the "_" to " ", so "force_null" becomes "force null" :
COPY test_copy FROM '/mnt/disk1/files/test_file.csv' with csv header delimiter ';' force null date_column, date_column2, date_column3, date_column4, date_column5 encoding 'latin1';
COPY 99999