From 69b0d5cf2a629b02a57a3777d02fdbf3654c416e Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Tue, 25 Feb 2014 06:01:27 -0500 Subject: [PATCH] Fix string escaping * Postgresql has strict SQL conformance on by default as of 9.1; use the E'' string format instead of standard escaped strings. --- libpq/pg.sml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpq/pg.sml b/libpq/pg.sml index 1b99da2..09c761a 100644 --- a/libpq/pg.sml +++ b/libpq/pg.sml @@ -158,7 +158,7 @@ struct | xch #"\r" = "\\r" | xch c = str c in - foldl (fn (c, s) => s ^ xch c) "'" (String.explode s) ^ "'" + foldl (fn (c, s) => s ^ xch c) "E'" (String.explode s) ^ "'" end val stringFromSql = valueOf @@ -284,4 +284,4 @@ struct fun boolFromSql v = boolFromSql' (valueOf v) end -structure PgClient = SqlClient(PgDriver) \ No newline at end of file +structure PgClient = SqlClient(PgDriver) -- 2.20.1