Skip to content

Commit 361b94c

Browse files
committed
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
1 parent 20a1b9e commit 361b94c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/psql/copy.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,11 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary)
635635
/* check for EOF marker, but not on a partial line */
636636
if (firstload)
637637
{
638+
/*
639+
* This code erroneously assumes '\.' on a line alone
640+
* inside a quoted CSV string terminates the \copy.
641+
* http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org
642+
*/
638643
if (strcmp(buf, "\\.\n") == 0 ||
639644
strcmp(buf, "\\.\r\n") == 0)
640645
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy