call PQexec() and exit() on failure */
| 1328 | |
| 1329 | /* call PQexec() and exit() on failure */ |
| 1330 | static void |
| 1331 | executeStatement(PGconn *con, const char *sql) |
| 1332 | { |
| 1333 | PGresult *res; |
| 1334 | |
| 1335 | res = PQexec(con, sql); |
| 1336 | if (PQresultStatus(res) != PGRES_COMMAND_OK) |
| 1337 | { |
| 1338 | pg_log_fatal("query failed: %s", PQerrorMessage(con)); |
| 1339 | pg_log_info("query was: %s", sql); |
| 1340 | exit(1); |
| 1341 | } |
| 1342 | PQclear(res); |
| 1343 | } |
| 1344 | |
| 1345 | /* call PQexec() and complain, but without exiting, on failure */ |
| 1346 | static void |
no test coverage detected