diff options
author | Bruce Momjian <bruce@momjian.us> | 2023-11-03 13:57:59 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2023-11-03 13:57:59 -0400 |
commit | a5bee67c36cc05507e919ed1e2711a9c51f38afb (patch) | |
tree | b65cfea58d9eab8c61bd7731162f9ec1b5d7f071 /src | |
parent | 31a89ddeb8ebe1904a4a2fc8914f577c6ceb9dee (diff) | |
download | postgresql-a5bee67c36cc05507e919ed1e2711a9c51f38afb.tar.gz postgresql-a5bee67c36cc05507e919ed1e2711a9c51f38afb.zip |
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index 424a429e1e2..23363b038d0 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -629,6 +629,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)) |