Am 04.04.2012 22:01, schrieb Andy Chambers:
dcm_eob=> copy ar_data from '/tmp/ar-data.csv' with header true;
ERROR: syntax error at or near "true"
LINE 1: copy ar_data from '/tmp/ar-data.csv' with header true;
I can't figure out what's wrong with the syntax above. Is something missing?
copy ar_data
from $$/tmp/ar-data.csv$$
csv header delimiter ';'
;
... providet it's not a REAL csv as in "comma separated ..."
... $$ works better as ' at leas when you need to have backslashes in
the path.
... and you'll need to mind the encoding of the CSV if you use some
international signs
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general