Lines Matching refs:res

298 	PGresult *res;  in pgsql_handle_doer()  local
302 if (!(res = PQexec(H->server, sql))) { in pgsql_handle_doer()
307 qs = PQresultStatus(res); in pgsql_handle_doer()
309 pdo_pgsql_error(dbh, qs, pdo_pgsql_sqlstate(res)); in pgsql_handle_doer()
310 PQclear(res); in pgsql_handle_doer()
313 H->pgoid = PQoidValue(res); in pgsql_handle_doer()
314 ret = (qs == PGRES_COMMAND_OK) ? atol(PQcmdTuples(res)) : 0L; in pgsql_handle_doer()
315 PQclear(res); in pgsql_handle_doer()
368 PGresult *res; in pdo_pgsql_last_insert_id() local
372 res = PQexecParams(H->server, "SELECT CURRVAL($1)", 1, NULL, q, NULL, NULL, 0); in pdo_pgsql_last_insert_id()
373 status = PQresultStatus(res); in pdo_pgsql_last_insert_id()
375 if (res && (status == PGRES_TUPLES_OK)) { in pdo_pgsql_last_insert_id()
376 id = estrdup((char *)PQgetvalue(res, 0, 0)); in pdo_pgsql_last_insert_id()
377 *len = PQgetlength(res, 0, 0); in pdo_pgsql_last_insert_id()
379 pdo_pgsql_error(dbh, status, pdo_pgsql_sqlstate(res)); in pdo_pgsql_last_insert_id()
382 if (res) { in pdo_pgsql_last_insert_id()
383 PQclear(res); in pdo_pgsql_last_insert_id()
411 PGresult *res = PQexec(H->server, "SELECT VERSION()"); in pdo_pgsql_get_attribute() local
412 if (res && PQresultStatus(res) == PGRES_TUPLES_OK) { in pdo_pgsql_get_attribute()
413 ZVAL_STRING(return_value, (char *)PQgetvalue(res, 0, 0), 1); in pdo_pgsql_get_attribute()
416 if (res) { in pdo_pgsql_get_attribute()
417 PQclear(res); in pdo_pgsql_get_attribute()
500 PGresult *res; in pdo_pgsql_transaction_cmd() local
503 res = PQexec(H->server, cmd); in pdo_pgsql_transaction_cmd()
505 if (PQresultStatus(res) != PGRES_COMMAND_OK) { in pdo_pgsql_transaction_cmd()
506 pdo_pgsql_error(dbh, PQresultStatus(res), pdo_pgsql_sqlstate(res)); in pdo_pgsql_transaction_cmd()
510 PQclear(res); in pdo_pgsql_transaction_cmd()