summaryrefslogtreecommitdiff
path: root/src/postgres.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-12-29 16:08:34 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-12-29 16:08:34 -0500
commitcc06e6bceb5b5f472c86091dedaa374e7bd72067 (patch)
treea7c6ec7ebc81baeeb6594b39d1c370c9aa9c582d /src/postgres.sml
parent8d6870717691d2ba46e518c8d1687236019368d1 (diff)
Add dynamic content before running its scripts, to get IDs in scope; fix generation of Postgres queries with blobs
Diffstat (limited to 'src/postgres.sml')
-rw-r--r--src/postgres.sml3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/postgres.sml b/src/postgres.sml
index f3b9e3f1..c180e38f 100644
--- a/src/postgres.sml
+++ b/src/postgres.sml
@@ -680,7 +680,7 @@ fun makeParams inputs =
string " };",
newline,
if List.exists isBlob inputs then
- box [string "const int *paramLengths = uw_malloc(ctx, ",
+ box [string "int *paramLengths = uw_malloc(ctx, ",
string (Int.toString (length inputs)),
string " * sizeof(int));",
newline,
@@ -696,7 +696,6 @@ fun makeParams inputs =
| _ => string "0",
string ";",
newline]) inputs,
- string " };",
newline]
else
box [string "const int *paramLengths = paramFormats;",