Lines Matching refs:pgsql_result
1717 PGresult *pgsql_result; local
1743 while ((pgsql_result = PQgetResult(pgsql))) {
1744 PQclear(pgsql_result);
1750 pgsql_result = PQexec(pgsql, query);
1752 PQclear(pgsql_result);
1754 pgsql_result = PQexec(pgsql, query);
1757 if (pgsql_result) {
1758 status = PQresultStatus(pgsql_result);
1769 PQclear(pgsql_result);
1774 if (pgsql_result) {
1777 pg_result->result = pgsql_result;
1781 PQclear(pgsql_result);
1819 PGresult *pgsql_result; local
1845 while ((pgsql_result = PQgetResult(pgsql))) {
1846 PQclear(pgsql_result);
1886 pgsql_result = PQexecParams(pgsql, query, num_params,
1889 PQclear(pgsql_result);
1891 pgsql_result = PQexecParams(pgsql, query, num_params,
1895 if (pgsql_result) {
1896 status = PQresultStatus(pgsql_result);
1909 PQclear(pgsql_result);
1914 if (pgsql_result) {
1917 pg_result->result = pgsql_result;
1921 PQclear(pgsql_result);
1940 PGresult *pgsql_result; local
1966 while ((pgsql_result = PQgetResult(pgsql))) {
1967 PQclear(pgsql_result);
1973 pgsql_result = PQprepare(pgsql, stmtname, query, 0, NULL);
1975 PQclear(pgsql_result);
1977 pgsql_result = PQprepare(pgsql, stmtname, query, 0, NULL);
1980 if (pgsql_result) {
1981 status = PQresultStatus(pgsql_result);
1992 PQclear(pgsql_result);
1997 if (pgsql_result) {
2000 pg_result->result = pgsql_result;
2004 PQclear(pgsql_result);
2026 PGresult *pgsql_result; local
2052 while ((pgsql_result = PQgetResult(pgsql))) {
2053 PQclear(pgsql_result);
2093 pgsql_result = PQexecPrepared(pgsql, stmtname, num_params,
2096 PQclear(pgsql_result);
2098 pgsql_result = PQexecPrepared(pgsql, stmtname, num_params,
2102 if (pgsql_result) {
2103 status = PQresultStatus(pgsql_result);
2116 PQclear(pgsql_result);
2121 if (pgsql_result) {
2124 pg_result->result = pgsql_result;
2128 PQclear(pgsql_result);
2146 PGresult *pgsql_result; local
2155 pgsql_result = pg_result->result;
2159 Z_LVAL_P(return_value) = PQntuples(pgsql_result);
2162 Z_LVAL_P(return_value) = PQnfields(pgsql_result);
2166 Z_LVAL_P(return_value) = atoi(PQcmdTuples(pgsql_result));
2389 PGresult *pgsql_result; local
2399 pgsql_result = pg_result->result;
2401 if (field < 0 || field >= PQnfields(pgsql_result)) {
2408 Z_STRVAL_P(return_value) = PQfname(pgsql_result, field);
2414 Z_LVAL_P(return_value) = PQfsize(pgsql_result, field);
2418 …Z_STRVAL_P(return_value) = get_field_name(pg_result->conn, PQftype(pgsql_result, field), &EG(regul…
2424 oid = PQftype(pgsql_result, field);
2486 PGresult *pgsql_result; local
2495 pgsql_result = pg_result->result;
2497 Z_LVAL_P(return_value) = PQfnumber(pgsql_result, field);
2508 PGresult *pgsql_result; local
2524 pgsql_result = pg_result->result;
2530 if (pgsql_row >= PQntuples(pgsql_result)) {
2535 if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
2543 field_offset = PQfnumber(pgsql_result, Z_STRVAL_PP(field));
2550 if (field_offset<0 || field_offset>=PQnfields(pgsql_result)) {
2555 if (PQgetisnull(pgsql_result, pgsql_row, field_offset)) {
2558 char *value = PQgetvalue(pgsql_result, pgsql_row, field_offset);
2559 int value_len = PQgetlength(pgsql_result, pgsql_row, field_offset);
2569 PGresult *pgsql_result; local
2618 pgsql_result = pg_result->result;
2623 if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
2631 if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
2638 for (i = 0, num_fields = PQnfields(pgsql_result); i < num_fields; i++) {
2639 if (PQgetisnull(pgsql_result, pgsql_row, i)) {
2644 field_name = PQfname(pgsql_result, i);
2648 char *element = PQgetvalue(pgsql_result, pgsql_row, i);
2664 field_name = PQfname(pgsql_result, i);
2781 PGresult *pgsql_result; local
2790 pgsql_result = pg_result->result;
2792 if (php_pgsql_result2array(pgsql_result, return_value TSRMLS_CC) == FAILURE) {
2804 PGresult *pgsql_result; local
2816 pgsql_result = pg_result->result;
2818 num_fields = PQnfields(pgsql_result);
2826 if ((pg_numrows = PQntuples(pgsql_result)) <= 0) {
2831 if (PQgetisnull(pgsql_result, pg_row, colno)) {
2834 add_next_index_string(return_value, PQgetvalue(pgsql_result, pg_row, colno), 1);
2874 PGresult *pgsql_result; local
2890 pgsql_result = pg_result->result;
2896 if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
2901 if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
2911 field_offset = PQfnumber(pgsql_result, Z_STRVAL_PP(field));
2918 if (field_offset < 0 || field_offset >= PQnfields(pgsql_result)) {
2925 Z_LVAL_P(return_value) = PQgetlength(pgsql_result, pgsql_row, field_offset);
2928 Z_LVAL_P(return_value) = PQgetisnull(pgsql_result, pgsql_row, field_offset);
2976 PGresult *pgsql_result; local
2987 pgsql_result = pg_result->result;
2989 oid = PQoidValue(pgsql_result);
2995 Z_STRVAL_P(return_value) = (char *) PQoidStatus(pgsql_result);
3879 PGresult *pgsql_result; local
3907 while ((pgsql_result = PQgetResult(pgsql))) {
3908 PQclear(pgsql_result);
3910 pgsql_result = PQexec(pgsql, query);
3916 if (pgsql_result) {
3917 status = PQresultStatus(pgsql_result);
3924 if (pgsql_result) {
3925 PQclear(pgsql_result);
3988 while ((pgsql_result = PQgetResult(pgsql))) {
3989 PQclear(pgsql_result);
3992 PQclear(pgsql_result);
3997 PQclear(pgsql_result);
4018 PGresult *pgsql_result; local
4038 while ((pgsql_result = PQgetResult(pgsql))) {
4039 PQclear(pgsql_result);
4041 pgsql_result = PQexec(pgsql, query);
4048 if (pgsql_result) {
4049 status = PQresultStatus(pgsql_result);
4056 if (pgsql_result) {
4058 PQclear(pgsql_result);
4105 while ((pgsql_result = PQgetResult(pgsql))) {
4106 if (PGRES_COMMAND_OK != PQresultStatus(pgsql_result)) {
4110 PQclear(pgsql_result);
4116 PQclear(pgsql_result);
4122 PQclear(pgsql_result);
4421 PGresult *pgsql_result; local
4432 pgsql_result = pg_result->result;
4433 if (!pgsql_result) {
4436 err = (char *)PQresultErrorMessage(pgsql_result);
4449 PGresult *pgsql_result; local
4460 pgsql_result = pg_result->result;
4461 if (!pgsql_result) {
4474 field = (char *)PQresultErrorField(pgsql_result, fieldcode);
4588 PGresult *pgsql_result; local
4610 while ((pgsql_result = PQgetResult(pgsql))) {
4611 PQclear(pgsql_result);
4953 PGresult *pgsql_result; local
4962 pgsql_result = PQgetResult(pgsql);
4963 if (!pgsql_result) {
4969 pg_result->result = pgsql_result;
4982 PGresult *pgsql_result; local
4992 pgsql_result = pg_result->result;
4994 status = PQresultStatus(pgsql_result);
4998 RETURN_STRING(PQcmdStatus(pgsql_result), 1);