Re: [BUGS] BUG #2114: (patch) COPY FROM ... end of copy

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [BUGS] BUG #2114: (patch) COPY FROM ... end of copy
Дата
Msg-id 43B154DC.8090100@dunslane.net
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #2114: (patch) COPY FROM ... end of copy marker corrupt  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [BUGS] BUG #2114: (patch) COPY FROM ... end of copy marker  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches

Bruce Momjian wrote:

> The big problem is that \. is also a valid
>CSV data value (though not a valid non-CSV data value).  So, the
>solution we came up with was to require \. to appear alone on a line in
>CSV mode for it to be treated as end-of-copy.
>

According to the docs, that's the way to specify EOD in both text and
CSV mode:

  End of data can be represented by a single line containing just
backslash-period.

Your analysis regarding line_buf.len seems correct.

We probably should have a regression test with \. in a CSV field.

cheers

andrew


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: list of scalars for fors and fore stms II
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] BUG #2114: (patch) COPY FROM ... end of copy marker