提交 361b94c4 编写于 作者: B Bruce Momjian

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
上级 20a1b9e7
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册