From cdd504ea9f9dcf4cfe18756e48319b7a9df296cd Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 7 Sep 2010 09:06:13 -0400 Subject: 'tryDml' works with Postgres --- src/cjr_print.sml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/cjr_print.sml') diff --git a/src/cjr_print.sml b/src/cjr_print.sml index 9b5edab5..5282ddc2 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -1794,10 +1794,7 @@ fun p_exp' par env (e, loc) = end | EDml {dml, prepared, mode} => - box [case mode of - Settings.Error => box [] - | Settings.None => string "({const char *uw_errmsg = NULL;", - string "(uw_begin_region(ctx), ({", + box [string "(uw_begin_region(ctx), ({", newline, case prepared of NONE => box [string "char *dml = ", @@ -1838,13 +1835,10 @@ fun p_exp' par env (e, loc) = case mode of Settings.Error => string "uw_unit_v;" - | Settings.None => string "uw_errmsg ? uw_strdup(ctx, uw_errmsg) : NULL;", + | Settings.None => string "uw_dup_and_clear_error_message(ctx);", newline, - string "}))", - case mode of - Settings.Error => box [] - | Settings.None => string ";})"] + string "}))"] | ENextval {seq, prepared} => box [string "({", -- cgit v1.2.3