From 361b94c4b98b85b19b850cff37be76d1f6d4f8f7 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 4 Jul 2013 13:09:52 -0400 Subject: 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 --- src/bin/psql/copy.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3