summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 12:40:40 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 12:40:40 -0400
commitfe9025e471578cbdef8ee21e0f9dc51f0f2107ce (patch)
tree69868d711618839352bda0d8d00aa7505c27892a /src/cjr_print.sml
parent549b3c11b75bb08eb6b686d2d1a04bc0ec7647a9 (diff)
Region memory allocation for query parameters
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 73a4f0fc..8bdb1ba5 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -712,7 +712,7 @@ fun p_exp' par env (e, loc) =
val outputs = exps @ tables
in
- box [string "({",
+ box [string "(uw_begin_region(ctx), ({",
newline,
string "PGconn *conn = uw_get_db(ctx);",
newline,
@@ -791,6 +791,8 @@ fun p_exp' par env (e, loc) =
newline,
newline,
+ string "uw_end_region(ctx);",
+ newline,
string "n = PQntuples(res);",
newline,
string "for (i = 0; i < n; ++i) {",
@@ -851,7 +853,7 @@ fun p_exp' par env (e, loc) =
newline,
string "acc;",
newline,
- string "})"]
+ string "}))"]
end
| EDml {dml, prepared} =>