diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c
new file mode 100644
index b5732c7..c1e7cfe
*** a/src/bin/psql/copy.c
--- b/src/bin/psql/copy.c
*************** handleCopyIn(PGconn *conn, FILE *copystr
*** 635,640 ****
--- 635,645 ----
  				/* 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)
  					{
