| 44 | } |
| 45 | |
| 46 | static bool db_postgres_begin_tx(struct db *db) |
| 47 | { |
| 48 | assert(db->conn); |
| 49 | PGresult *res; |
| 50 | res = PQexec(db->conn, "BEGIN;"); |
| 51 | if (PQresultStatus(res) != PGRES_COMMAND_OK) { |
| 52 | db->error = tal_fmt(db, "BEGIN command failed: %s", |
| 53 | PQerrorMessage(db->conn)); |
| 54 | PQclear(res); |
| 55 | return false; |
| 56 | } |
| 57 | PQclear(res); |
| 58 | return true; |
| 59 | } |
| 60 | |
| 61 | static bool db_postgres_commit_tx(struct db *db) |
| 62 | { |
nothing calls this directly
no outgoing calls
no test coverage detected