summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-09-07 09:06:13 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2010-09-07 09:06:13 -0400
commitcdd504ea9f9dcf4cfe18756e48319b7a9df296cd (patch)
tree301967018e16a7c4e7c27b64e5e4b08f288eba7f /src/cjr_print.sml
parent5545969f485ef2fb944db8e7b0237acbabeb8d4c (diff)
'tryDml' works with Postgres
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml12
1 files changed, 3 insertions, 9 deletions
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 "({",