| 59 | } |
| 60 | |
| 61 | static bool db_postgres_commit_tx(struct db *db) |
| 62 | { |
| 63 | assert(db->conn); |
| 64 | PGresult *res; |
| 65 | res = PQexec(db->conn, "COMMIT;"); |
| 66 | if (PQresultStatus(res) != PGRES_COMMAND_OK) { |
| 67 | db->error = tal_fmt(db, "COMMIT command failed: %s", |
| 68 | PQerrorMessage(db->conn)); |
| 69 | PQclear(res); |
| 70 | return false; |
| 71 | } |
| 72 | PQclear(res); |
| 73 | return true; |
| 74 | } |
| 75 | |
| 76 | static PGresult *db_postgres_do_exec(struct db_stmt *stmt) |
| 77 | { |
nothing calls this directly
no outgoing calls
no test coverage detected