| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Obsolete comment in CopyReadLineText() |
| Date: | 2024-04-05 20:07:48 |
| Message-ID: | 1461688.1712347668@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2024-04-05 20:09:58 | Re: WIP Incremental JSON Parser |
| Previous Message | Tomas Vondra | 2024-04-05 19:43:18 | Re: pg_combinebackup --copy-file-range |