diff src/postgres.sml @ 880:8e9f2d247dba

Testing nested queries
author Adam Chlipala <adamc@hcoop.net>
date Fri, 17 Jul 2009 12:25:34 -0400
parents b2a175a0f2ef
children 9c1b7e46eed2
line wrap: on
line diff
--- a/src/postgres.sml	Thu Jul 16 18:10:29 2009 -0400
+++ b/src/postgres.sml	Fri Jul 17 12:25:34 2009 -0400
@@ -494,7 +494,7 @@
          newline,
          string "}"]
 
-fun p_getcol {wontLeakStrings, col = i, typ = t} =
+fun p_getcol {loc, wontLeakStrings, col = i, typ = t} =
     let
         fun p_unsql t e eLen =
             case t of
@@ -550,7 +550,9 @@
                           space,
                           string "tmp;",
                           newline,
-                          string "uw_error(ctx, FATAL, \"Unexpectedly NULL field #",
+                          string "uw_error(ctx, FATAL, \"",
+                          string (ErrorMsg.spanToString loc),
+                          string ": Unexpectedly NULL field #",
                           string (Int.toString i),
                           string "\");",
                           newline,