Reported-by: Svante Richter
Discussion: https://postgr.es/m/
fcd57e4-8f23-4c3e-a5db-
2571d09208e2@beta.fastmail.com
Backpatch-through: 11
destination, because all data must pass through the client/server
connection. For large amounts of data the <acronym>SQL</acronym>
command might be preferable.
+ Also, because of this pass-through method, <literal>\copy
+ ... from</literal> in <acronym>CSV</acronym> mode will erroneously
+ treat a <literal>\.</literal> data value alone on a line as an
+ end-of-input marker.
</para>
</tip>
* This code erroneously assumes '\.' on a line alone
* inside a quoted CSV string terminates the \copy.
+ *
*/
if ((linelen == 3 && memcmp(fgresult, "\\.\n", 3) == 0) ||
(linelen == 4 && memcmp(fgresult, "\\.\r\n", 4) == 0))