Fixing backslash dot for COPY FROM...CSV

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Fixing backslash dot for COPY FROM...CSV
Дата
Msg-id ed659f37-a9dd-42a7-82b9-0da562cc4006@manitou-mail.org
обсуждение исходный текст
Ответы Re: Fixing backslash dot for COPY FROM...CSV  (vignesh C <vignesh21@gmail.com>)
Re: Fixing backslash dot for COPY FROM...CSV  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
  Hi,

PFA a patch that attempts to fix the bug that \. on a line
by itself is handled incorrectly by COPY FROM ... CSV.
This issue has been discussed several times previously,
for instance in [1] and [2], and mentioned in the
doc for \copy in commit 42d3125.

There's one case that works today: when
the line is part of a multi-line quoted section,
and the data is read from a file, not from the client.
In other situations, an error is raised or the data is cut at
the point of \. without an error.

The patch addresses that issue in the server and in psql,
except for the case of inlined data, where \. cannot be
both valid data and an EOF marker at the same time, so
it keeps treating it as an EOF marker.


[1]
https://www.postgresql.org/message-id/10e3eff6-eb04-4b3f-aeb4-b920192b977a@manitou-mail.org
[2]
https://www.postgresql.org/message-id/8aeab305-5e94-4fa5-82bf-6da6baee6e05%40app.fastmail.com


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite

Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Built-in CTYPE provider
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: encoding affects ICU regex character classification