used_passed_result_object = TRUE;
if (!used_passed_result_object)
{
- if ((res->status == PGRES_EMPTY_QUERY) || (res->status == PGRES_FATAL_ERROR) ||
- (res->status == PGRES_BAD_RESPONSE))
+ if ((res->status == PGRES_EMPTY_QUERY) || (res->status == PGRES_BAD_RESPONSE))
{
- mylog("send_query: sended query failed -> abort\n");
+ mylog("send_query: sending query failed -> abort\n");
QR_set_aborted(res, TRUE);
QR_Destructor(res);
- res = NULL;
+ res = NULL;
+ goto cleanup;
+ }
+ else if (res->status == PGRES_FATAL_ERROR)
+ {
+ mylog("send_query: sended query failed -> abort\n");
+ QR_set_aborted(res, TRUE);
goto cleanup;
}
if (create_keyset)