[MASSMAIL]Obsolete comment in CopyReadLineText()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [MASSMAIL]Obsolete comment in CopyReadLineText()
Дата
Msg-id 1461688.1712347668@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
CopyReadLineText quoth:

     * The objective of this loop is to transfer the entire next input line
     * into line_buf.  Hence, we only care for detecting newlines (\r and/or
     * \n) and the end-of-copy marker (\.).
     *
     * In CSV mode, \r and \n inside a quoted field are just part of the data
     * value and are put in line_buf.  We keep just enough state to know if we
     * are currently in a quoted field or not.
     *
     * These four characters, and the CSV escape and quote characters, are
     * assumed the same in frontend and backend encodings.

When that last bit was written, it was because we were detecting
newlines and end-of-copy markers before performing encoding
conversion.  That's not true any more: by the time CopyReadLineText
sees the data, it was already converted by CopyConvertBuf.  So
I don't believe there actually is any such dependency anymore,
and we should simply remove that last sentence.  Any objections?

            regards, tom lane



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: pg_combinebackup --copy-file-range
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: WIP Incremental JSON Parser