diff src/postgres.sml @ 1650:1bfd793e7eb8

Add dynamic content before running its scripts, to get IDs in scope; fix generation of Postgres queries with blobs
author Adam Chlipala <adam@chlipala.net>
date Thu, 29 Dec 2011 16:08:34 -0500
parents 8128fcb2d4a4
children 3e7c7e200713
line wrap: on
line diff
--- a/src/postgres.sml	Thu Dec 29 14:12:03 2011 -0500
+++ b/src/postgres.sml	Thu Dec 29 16:08:34 2011 -0500
@@ -680,7 +680,7 @@
          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 @@
                                                  | _ => string "0",
                                                string ";",
                                                newline]) inputs,
-                  string " };",
                   newline]
          else
              box [string "const int *paramLengths = paramFormats;",