Fix to deal with backslashes according to the config of standard_conforming_strings
authorBo Peng <pengbo@sraoss.co.jp>
Fri, 7 Jun 2019 08:19:37 +0000 (17:19 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Fri, 7 Jun 2019 08:31:41 +0000 (17:31 +0900)
in native replication mode.

per bug467.

src/parser/outfuncs.c

index 595ba1d774cfbcd0ca9e1729217166cea488e8d8..1576222fbfb7e74c0d0684749da1e127bd9acf32 100644 (file)
@@ -252,7 +252,8 @@ static char *escape_string(char *str)
                }
                else if (str[i] == '\\')
                {
-                       es[j++] = '\\';
+                       if (!standard_conforming_strings)
+                               es[j++] = '\\';
                }
                es[j] = str[i];
        }