Re: COPY not handling csv files with quoted fiedls with embedded delimiters correctly

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY not handling csv files with quoted fiedls with embedded delimiters correctly
Дата
Msg-id 18296.1229134794@sss.pgh.pa.us
обсуждение исходный текст
Ответ на COPY not handling csv files with quoted fiedls with embedded delimiters correctly  (Mary Anderson <maryfran@demog.berkeley.edu>)
Список pgsql-novice
Mary Anderson <maryfran@demog.berkeley.edu> writes:
>    Command:

> COPY input.input_file_m105 (test_date,deaths_)
> FROM '/home/maryfran/memdev/DATA/DATES/Mmmm_ddCOMMA_yyyy.txt'
> WITH CSV HEADER

>    File:

> test_date,deaths                                         /* this is
> first line of file*/
> "January 3, 1999","123"

> Error message:

> ERROR: extra data after last expected column CONTEXT: COPY
> input_file_m105, line 2: "January 3, 1999,123"

Maybe you aren't reading the same file you think you are?  Because
the error message says that there are no quotes on the line that the
backend saw.

            regards, tom lane

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

Предыдущее
От: Mary Anderson
Дата:
Сообщение: COPY not handling csv files with quoted fiedls with embedded delimiters correctly
Следующее
От: Bruce Hyatt
Дата:
Сообщение: connection refused