X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pqcopy.c;h=c073798efde10630bdc7b6606a3457d15e02b413;hb=1b5358df410e66224c7e8251d286134b0f3f59d3;hp=32e20bac26c269ad09a43fc549b28c53987a0d80;hpb=cffcf8e687650733164a8baa53d04dea98ee6ca7;p=m6w6%2Fext-pq diff --git a/src/php_pqcopy.c b/src/php_pqcopy.c index 32e20ba..c073798 100644 --- a/src/php_pqcopy.c +++ b/src/php_pqcopy.c @@ -150,7 +150,7 @@ static PHP_METHOD(pqcopy, __construct) { smart_str_appendl(&cmd, opt_str, opt_len); smart_str_0(&cmd); - res = PQexec(conn_obj->intern->conn, cmd.c); + res = php_pq_exec(conn_obj->intern->conn, cmd.c); if (!res) { throw_exce(EX_RUNTIME TSRMLS_CC, "Failed to start %s (%s)", cmd.c, PHP_PQerrorMessage(obj->intern->conn->intern->conn)); @@ -164,7 +164,7 @@ static PHP_METHOD(pqcopy, __construct) { php_pq_object_addref(conn_obj TSRMLS_CC); } - PHP_PQclear(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -232,7 +232,7 @@ static PHP_METHOD(pqcopy, end) { throw_exce(EX_RUNTIME TSRMLS_CC, "Failed to fetch COPY result (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } else { php_pqres_success(res TSRMLS_CC); - PHP_PQclear(res); + php_pqres_clear(res); } } @@ -277,7 +277,7 @@ static PHP_METHOD(pqcopy, get) { throw_exce(EX_RUNTIME TSRMLS_CC, "Failed to fetch COPY result (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } else { php_pqres_success(res TSRMLS_CC); - PHP_PQclear(res); + php_pqres_clear(res); RETVAL_FALSE; } break;