if (obj->conn) {
if (obj->poller) {
- RETURN_LONG(obj->poller(obj->conn));
+ if (obj->poller == PQconsumeInput) {
+ RETURN_LONG(obj->poller(obj->conn) * PGRES_POLLING_OK);
+ } else {
+ RETURN_LONG(obj->poller(obj->conn));
+ }
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No asynchronous operation active");
}
case PGRES_BAD_RESPONSE:
case PGRES_NONFATAL_ERROR:
case PGRES_FATAL_ERROR:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: %s", PQresStatus(PQresultStatus(res)), PQresultErrorMessage(res));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", PQresultErrorMessage(res));
return FAILURE;
default:
return SUCCESS;