Lines Matching refs:pg_result

735 	PHP_FALIAS(pg_result,	     pg_fetch_result,   arginfo_pg_get_result)
1045 pgsql_result_handle *pg_result = (pgsql_result_handle *)rsrc->ptr; in _free_result() local
1047 PQclear(pg_result->result); in _free_result()
1048 efree(pg_result); in _free_result()
1278 PGresult *pg_result; local
1374 PGresult *pg_result; local
1375 pg_result = PQexec(le->ptr, "select 1");
1376 PQclear(pg_result);
1401 pg_result = PQexec(pgsql, "RESET ALL;");
1402 PQclear(pg_result);
1830 pgsql_result_handle *pg_result; local
1886 pg_result = (pgsql_result_handle *) emalloc(sizeof(pgsql_result_handle));
1887 pg_result->conn = pgsql;
1888 pg_result->result = pgsql_result;
1889 pg_result->row = 0;
1890 ZEND_REGISTER_RESOURCE(return_value, pg_result, le_result);
1932 pgsql_result_handle *pg_result; local
2026 pg_result = (pgsql_result_handle *) emalloc(sizeof(pgsql_result_handle));
2027 pg_result->conn = pgsql;
2028 pg_result->result = pgsql_result;
2029 pg_result->row = 0;
2030 ZEND_REGISTER_RESOURCE(return_value, pg_result, le_result);
2053 pgsql_result_handle *pg_result; local
2109 pg_result = (pgsql_result_handle *) emalloc(sizeof(pgsql_result_handle));
2110 pg_result->conn = pgsql;
2111 pg_result->result = pgsql_result;
2112 pg_result->row = 0;
2113 ZEND_REGISTER_RESOURCE(return_value, pg_result, le_result);
2139 pgsql_result_handle *pg_result; local
2233 pg_result = (pgsql_result_handle *) emalloc(sizeof(pgsql_result_handle));
2234 pg_result->conn = pgsql;
2235 pg_result->result = pgsql_result;
2236 pg_result->row = 0;
2237 ZEND_REGISTER_RESOURCE(return_value, pg_result, le_result);
2258 pgsql_result_handle *pg_result; local
2264 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2266 pgsql_result = pg_result->result;
2405 pgsql_result_handle *pg_result; local
2417 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2419 if (fnum < 0 || fnum >= PQnfields(pg_result->result)) {
2424 oid = PQftable(pg_result->result, fnum);
2459 …if ((tmp_res = PQexec(pg_result->conn, querystr.c)) == NULL || PQresultStatus(tmp_res) != PGRES_TU…
2501 pgsql_result_handle *pg_result; local
2508 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2510 pgsql_result = pg_result->result;
2529 …Z_STRVAL_P(return_value) = get_field_name(pg_result->conn, PQftype(pgsql_result, field), &EG(regul…
2598 pgsql_result_handle *pg_result; local
2604 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2606 pgsql_result = pg_result->result;
2620 pgsql_result_handle *pg_result; local
2633 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2635 pgsql_result = pg_result->result;
2637 if (pg_result->row < 0) {
2638 pg_result->row = 0;
2640 pgsql_row = pg_result->row;
2681 pgsql_result_handle *pg_result; local
2727 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2729 pgsql_result = pg_result->result;
2733 pg_result->row = pgsql_row;
2741 pgsql_row = pg_result->row;
2745 pg_result->row++;
2882 pgsql_result_handle *pg_result; local
2888 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2890 pgsql_result = pg_result->result;
2905 pgsql_result_handle *pg_result; local
2914 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2916 pgsql_result = pg_result->result;
2946 pgsql_result_handle *pg_result; local
2952 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2954 if (row < 0 || row >= PQntuples(pg_result->result)) {
2959 pg_result->row = row;
2975 pgsql_result_handle *pg_result; local
2988 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
2990 pgsql_result = pg_result->result;
2992 if (pg_result->row < 0) {
2993 pg_result->row = 0;
2995 pgsql_row = pg_result->row;
3056 pgsql_result_handle *pg_result; local
3062 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
3077 pgsql_result_handle *pg_result; local
3086 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
3087 pgsql_result = pg_result->result;
4592 pgsql_result_handle *pg_result; local
4600 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
4602 pgsql_result = pg_result->result;
4620 pgsql_result_handle *pg_result; local
4628 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
4630 pgsql_result = pg_result->result;
5196 pgsql_result_handle *pg_result; local
5209 pg_result = (pgsql_result_handle *) emalloc(sizeof(pgsql_result_handle));
5210 pg_result->conn = pgsql;
5211 pg_result->result = pgsql_result;
5212 pg_result->row = 0;
5213 ZEND_REGISTER_RESOURCE(return_value, pg_result, le_result);
5225 pgsql_result_handle *pg_result; local
5232 ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, &result, -1, "PostgreSQL result", le_result);
5234 pgsql_result = pg_result->result;
5468 PGresult *pg_result; local
5532 pg_result = PQexec(pg_link, querystr.c);
5533 if (PQresultStatus(pg_result) != PGRES_TUPLES_OK || (num_rows = PQntuples(pg_result)) == 0) {
5536 PQclear(pg_result);
5546 add_assoc_long(elem, "num", atoi(PQgetvalue(pg_result,i,1)));
5548 add_assoc_string(elem, "type", PQgetvalue(pg_result,i,2), 1);
5550 add_assoc_long(elem, "len", atoi(PQgetvalue(pg_result,i,3)));
5552 add_assoc_bool(elem, "not null", !strcmp(PQgetvalue(pg_result,i,4), "t"));
5554 add_assoc_bool(elem, "has default", !strcmp(PQgetvalue(pg_result,i,5), "t"));
5556 add_assoc_long(elem, "array dims", atoi(PQgetvalue(pg_result,i,6)));
5558 add_assoc_bool(elem, "is enum", !strcmp(PQgetvalue(pg_result,i,7), "e"));
5561 add_assoc_bool(elem, "is base", !strcmp(PQgetvalue(pg_result,i,7), "b"));
5562 add_assoc_bool(elem, "is composite", !strcmp(PQgetvalue(pg_result,i,7), "c"));
5563 add_assoc_bool(elem, "is pesudo", !strcmp(PQgetvalue(pg_result,i,7), "p"));
5565 add_assoc_string(elem, "description", PQgetvalue(pg_result,i,8), 1);
5568 name = PQgetvalue(pg_result,i,0);
5571 PQclear(pg_result);
6487 PGresult *pg_result; local
6489 pg_result = PQexec(pg_link, querystr->c);
6490 if (PQresultStatus(pg_result) == expect) {
6491 PQclear(pg_result);
6494 php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", PQresultErrorMessage(pg_result));
6495 PQclear(pg_result);
6674 PGresult *pg_result; local
6700 pg_result = PQexec(pg_link, sql);
6702 PQclear(pg_result);
6704 pg_result = PQexec(pg_link, sql);
6708 if (pg_result) {
6709 status = PQresultStatus(pg_result);
6720 PQclear(pg_result);
6725 if (pg_result) {
6728 pgsql_handle->result = pg_result;
6733 PQclear(pg_result);
7016 PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array TSRMLS_DC) argument
7025 if ((pg_numrows = PQntuples(pg_result)) <= 0) {
7032 for (i = 0, num_fields = PQnfields(pg_result); i < num_fields; i++) {
7033 if (PQgetisnull(pg_result, pg_row, i)) {
7034 field_name = PQfname(pg_result, i);
7037 char *element = PQgetvalue(pg_result, pg_row, i);
7046 field_name = PQfname(pg_result, i);
7063 PGresult *pg_result; local
7094 pg_result = PQexec(pg_link, querystr.c);
7095 if (PQresultStatus(pg_result) == PGRES_TUPLES_OK) {
7096 ret = php_pgsql_result2array(pg_result, ret_array TSRMLS_CC);
7100 PQclear(pg_result);