Re: copy syntax

Поиск
Список
Период
Сортировка
От Andreas
Тема Re: copy syntax
Дата
Msg-id 4F7CC13E.20800@gmx.net
обсуждение исходный текст
Ответ на copy syntax  (Andy Chambers <achambers@mcna.net>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Jon Nelson
Дата:
Сообщение: Re: views, queries, and locks
Следующее
От: "hans wulf"
Дата:
Сообщение: Hot synchron backup doesn't start