* Process (and delete) a query result. Returns true if there's no problem, * false otherwise. It's up to the handler to decide what constitutes a * problem. */
| 38 | * problem. |
| 39 | */ |
| 40 | static bool |
| 41 | processQueryResult(ParallelSlot *slot, PGresult *result) |
| 42 | { |
| 43 | Assert(slot->handler != NULL); |
| 44 | |
| 45 | /* On failure, the handler should return NULL after freeing the result */ |
| 46 | if (!slot->handler(result, slot->connection, slot->handler_context)) |
| 47 | return false; |
| 48 | |
| 49 | /* Ok, we have to free it ourself */ |
| 50 | PQclear(result); |
| 51 | return true; |
| 52 | } |
| 53 | |
| 54 | /* |
| 55 | * Consume all the results generated for the given connection until |
no test coverage detected