[main.c] libpq will have status PGRES_TUPLES_OK when command is done

This commit is contained in:
2024-11-24 17:38:18 -05:00
parent 6fad41ba21
commit 145e92db13

4
main.c
View File

@ -82,7 +82,9 @@ static void timer_retrieve_feeds(struct discord *client, struct discord_timer *t
PGresult *database_res;
while ((database_res = PQgetResult(database_conn))) {
if (PQresultStatus(database_res) != PGRES_SINGLE_TUPLE) {
log_error("Unable to retrieve feed: %s", PQresultErrorMessage(database_res));
if (PQresultStatus(database_res) != PGRES_TUPLES_OK) {
log_error("Unable to retrieve feeds: %s", PQresultErrorMessage(database_res));
}
goto db_loop_end;
}