Mercurial > urweb
comparison src/postgres.sml @ 2103:661b531f55bd
Fix arguments to PQprepare()
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 07 Jan 2015 09:25:13 -0500 |
parents | 4ef0c6605b3a |
children | d2a98983f502 |
comparison
equal
deleted
inserted
replaced
2102:0bd46c9e363f | 2103:661b531f55bd |
---|---|
338 newline, | 338 newline, |
339 string "PGresult *res;", | 339 string "PGresult *res;", |
340 newline, | 340 newline, |
341 newline, | 341 newline, |
342 | 342 |
343 p_list_sepi newline (fn i => fn (s, n) => | 343 p_list_sepi newline (fn i => fn (s, _) => |
344 box [string "res = PQprepare(conn, \"uw", | 344 box [string "res = PQprepare(conn, \"uw", |
345 string (Int.toString i), | 345 string (Int.toString i), |
346 string "\", \"", | 346 string "\", \"", |
347 string (Prim.toCString s), | 347 string (Prim.toCString s), |
348 string "\", ", | 348 string "\", 0, NULL);", |
349 string (Int.toString n), | |
350 string ", NULL);", | |
351 newline, | 349 newline, |
352 string "if (PQresultStatus(res) != PGRES_COMMAND_OK) {", | 350 string "if (PQresultStatus(res) != PGRES_COMMAND_OK) {", |
353 newline, | 351 newline, |
354 box [string "char msg[1024];", | 352 box [string "char msg[1024];", |
355 newline, | 353 newline, |