summaryrefslogtreecommitdiff
path: root/src/bin/psql/copy.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2023-11-03 13:57:59 -0400
committerBruce Momjian <bruce@momjian.us>2023-11-03 13:57:59 -0400
commit7f85099f4b3bf0142b19e87b5596a63c2df96274 (patch)
treed62c622e6edcffdd82d7bb06350a0b1e8ec1515c /src/bin/psql/copy.c
parentd5b1045e672c5a0c12222abf6033916f08caaf6f (diff)
doc: \copy can get data values \. and end-of-input confused
Reported-by: Svante Richter Discussion: https://postgr.es/m/fcd57e4-8f23-4c3e-a5db-2571d09208e2@beta.fastmail.com Backpatch-through: 11
Diffstat (limited to 'src/bin/psql/copy.c')
-rw-r--r--src/bin/psql/copy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c
index b3cc3d9a290..8d6ce4cedd7 100644
--- a/src/bin/psql/copy.c
+++ b/src/bin/psql/copy.c
@@ -627,6 +627,7 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary, PGresult **res)
* This code erroneously assumes '\.' on a line alone
* inside a quoted CSV string terminates the \copy.
* https://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org
+ * https://www.postgresql.org/message-id/bfcd57e4-8f23-4c3e-a5db-2571d09208e2@beta.fastmail.com
*/
if ((linelen == 3 && memcmp(fgresult, "\\.\n", 3) == 0) ||
(linelen == 4 && memcmp(fgresult, "\\.\r\n", 4) == 0))