pgFmtLit: Change condition for using E"..." syntax, fix #458.
Includes a test spec by @diogob.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user