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:32:06 +0000 (17:32 +0900)
in native replication mode.

per bug467.

src/parser/outfuncs.c

index 64ed8a71ca78626d73e46bf0bce779d473c2f9d7..ad88a752b86ef998d30ec845876d932366b32482 100644 (file)
@@ -245,7 +245,8 @@ static char *escape_string(char *str)
                }
                else if (str[i] == '\\')
                {
-                       es[j++] = '\\';
+                       if (!standard_conforming_strings)
+                               es[j++] = '\\';
                }
                es[j] = str[i];
        }