pgFmtLit: Change condition for using E"..." syntax, fix #458.

Includes a test spec by @diogob.
This commit is contained in:
Moti Zilberman
2016-01-15 11:59:25 +02:00
parent 0d9d74dc1c
commit 9a596c2500
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ pgFmtLit x =
let trimmed = trimNullChars x
escaped = "'" <> replace "'" "''" trimmed <> "'"
slashed = replace "\\" "\\\\" escaped in
if "\\\\" `isInfixOf` escaped
if "\\" `isInfixOf` escaped
then "E" <> slashed
else slashed