Re: Should CSV parsing be stricter about mid-field quotes?

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Should CSV parsing be stricter about mid-field quotes?
Дата
Msg-id 31677c7c-097f-490c-9527-80f9a4bbfabb@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Should CSV parsing be stricter about mid-field quotes?  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: Should CSV parsing be stricter about mid-field quotes?  (Kirk Wolak <wolakk@gmail.com>)
Список pgsql-hackers
    Joel Jacobson wrote:

> Is there a valid reason why \. is needed for COPY FROM filename?
> It seems to me it would only be necessary for the COPY FROM STDIN case,
> since files have a natural end-of-file and a known file size.

Looking at CopyReadLineText() over at [1], I don't see a reason why
the unquoted \. could not be handled with COPY FROM file.
Even COPY FROM STDIN looks like it could be benefit, so that
\copy from file csv would hopefully not choke or truncate the data.
There's still the case when the CSV data is embedded in a psql script
(psql is unable to know where it ends), but for that, "don't do that"
might be a reasonable answer.


[1]
https://doxygen.postgresql.org/copyfromparse_8c.html#a90201f711221dd82d0c08deedd91e1b3



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



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

Предыдущее
От: reid.thompson@crunchydata.com
Дата:
Сообщение: Re: Add the ability to limit the amount of memory that can be allocated to backends.
Следующее
От: Nikita Malakhov
Дата:
Сообщение: Re: RFI: Extending the TOAST Pointer