diff options
author | Bruce Momjian | 2023-11-03 17:57:59 +0000 |
---|---|---|
committer | Bruce Momjian | 2023-11-03 17:57:59 +0000 |
commit | 42d3125adae176cb7dcf7a4d896a78e615f6bbb4 (patch) | |
tree | f39ca00145dc0be500d530f7dec562094e875327 /src | |
parent | d391f6dcc377b961628510ee7049d78032816ac0 (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')
-rw-r--r-- | src/bin/psql/copy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index b3cc3d9a290..dbbbdb88987 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -627,6 +627,8 @@ 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)) |