diff options
author | Bruce Momjian <bruce@momjian.us> | 2013-07-04 13:09:52 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2013-07-04 13:09:52 -0400 |
commit | 361b94c4b98b85b19b850cff37be76d1f6d4f8f7 (patch) | |
tree | 69d90bcbb42b523a5757408b4e06b20c9f221b8e /src | |
parent | 20a1b9e71b18ba823858597dfd445174451ff5e7 (diff) | |
download | postgresql-361b94c4b98b85b19b850cff37be76d1f6d4f8f7.tar.gz postgresql-361b94c4b98b85b19b850cff37be76d1f6d4f8f7.zip |
Add C comment about \copy bug in CSV mode
Comment: This code erroneously assumes '\.' on a line alone inside a
quoted CSV string terminates the \copy.
http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/copy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index b5732c79709..c1e7cfeb8af 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -635,6 +635,11 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary) /* check for EOF marker, but not on a partial line */ if (firstload) { + /* + * This code erroneously assumes '\.' on a line alone + * inside a quoted CSV string terminates the \copy. + * http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org + */ if (strcmp(buf, "\\.\n") == 0 || strcmp(buf, "\\.\r\n") == 0) { |