| От | Michael Paquier |
|---|---|
| Тема | Re: backslash-dot quoting in COPY CSV |
| Дата | |
| Msg-id | 20190127131036.GC4672@paquier.xyz обсуждение |
| Ответ на | Re: backslash-dot quoting in COPY CSV (Bruce Momjian <bruce@momjian.us>) |
| Ответы |
Re: backslash-dot quoting in COPY CSV
Re: backslash-dot quoting in COPY CSV |
| Список | pgsql-hackers |
On Thu, Jan 24, 2019 at 10:09:30PM -0500, Bruce Momjian wrote: > This seems like a bug to me. Looking at the code, psql issues the > prompts for STDIN, but when it sees \. alone on a line, it has no idea > you are in a quoted CSV string, so it thinks the copy is done and sends > the result to the server. I can't see an easy way to fix this. I guess > we could document it. In src/bin/psql/copy.c, handleCopyIn(): /* * This code erroneously assumes '\.' on a line alone * inside a quoted CSV string terminates the \copy. * http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org */ if (strcmp(buf, "\\.\n") == 0 || strcmp(buf, "\\.\r\n") == 0) { copydone = true; break; } This story pops up from time to time.. -- Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера