Commit 52e4f27a authored by Bruce Momjian's avatar Bruce Momjian

Prevent doubling of escapes when not in quote mode for CSV.

parent 1ad59054
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.221 2004/04/19 17:22:30 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.222 2004/04/19 21:58:02 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2599,7 +2599,7 @@ CopyAttributeOutCSV(char *server_string, char *delim, char *quote, ...@@ -2599,7 +2599,7 @@ CopyAttributeOutCSV(char *server_string, char *delim, char *quote,
for (; (c = *string) != '\0'; string += mblen) for (; (c = *string) != '\0'; string += mblen)
{ {
if (c == quotec || c == escapec) if (need_quote && (c == quotec || c == escapec))
CopySendChar(escapec); CopySendChar(escapec);
CopySendChar(c); CopySendChar(c);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment