Re: \COPY from CSV ERROR: unterminated CSV quoted field

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: \COPY from CSV ERROR: unterminated CSV quoted field
Дата
Msg-id 10837.1403211919@sss.pgh.pa.us
обсуждение исходный текст
Ответ на \COPY from CSV ERROR: unterminated CSV quoted field  (ogromm <alex.schiller1990@web.de>)
Список pgsql-general
ogromm <alex.schiller1990@web.de> writes:
> I get the error "unterminated CSV quoted field" when I try to copy text with
> "new line \. new line"

> For example:

> CREATE TABLE test (text TEXT);
> \COPY test FROM 'test.csv' WITH DELIMITER ',' CSV HEADER;

> test.csv:
> Text
> "some text
> \.
> more text"

Yeah, psql's \copy command doesn't know anything about CSV mode, and
will take \. as an EOF marker even though it shouldn't.  If you need
to copy data like this I'd suggest using a backend-side COPY.

            regards, tom lane


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: max_connections reached in postgres 9.3.3
Следующее
От: Borislav Ivanov
Дата:
Сообщение: Re: max_connections reached in postgres 9.3.3