X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pqcopy.c;h=c073798efde10630bdc7b6606a3457d15e02b413;hb=eae24685735de58732c1de8cde21457f504ad98f;hp=32e20bac26c269ad09a43fc549b28c53987a0d80;hpb=10e7d6adccdd55554f1512de5e829a75aef62461;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;