* Consume all the results generated for the given connection until * nothing remains. If at least one error is encountered, return false. * Note that this will block if the connection is busy. */
| 57 | * Note that this will block if the connection is busy. |
| 58 | */ |
| 59 | static bool |
| 60 | consumeQueryResult(ParallelSlot *slot) |
| 61 | { |
| 62 | bool ok = true; |
| 63 | PGresult *result; |
| 64 | |
| 65 | SetCancelConn(slot->connection); |
| 66 | while ((result = PQgetResult(slot->connection)) != NULL) |
| 67 | { |
| 68 | if (!processQueryResult(slot, result)) |
| 69 | ok = false; |
| 70 | } |
| 71 | ResetCancelConn(); |
| 72 | return ok; |
| 73 | } |
| 74 | |
| 75 | /* |
| 76 | * Wait until a file descriptor from the given set becomes readable. |
no test coverage detected