mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
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
This commit is contained in:
parent
20a1b9e71b
commit
361b94c4b9
@ -635,6 +635,11 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary)
|
|||||||
/* check for EOF marker, but not on a partial line */
|
/* check for EOF marker, but not on a partial line */
|
||||||
if (firstload)
|
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 ||
|
if (strcmp(buf, "\\.\n") == 0 ||
|
||||||
strcmp(buf, "\\.\r\n") == 0)
|
strcmp(buf, "\\.\r\n") == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user