Lines Matching refs:PGG
86 (PGG(default_link) ? pgsql_link_from_obj(PGG(default_link)) : NULL); \
91 (PGG(default_link) ? pgsql_link_from_obj(PGG(default_link)) : NULL)
184 PGG(num_links)--; in pgsql_link_free()
186 zend_hash_del(&PGG(connections), link->hash); in pgsql_link_free()
302 if (PGG(default_link) != NULL) { in php_pgsql_set_default_link()
303 zend_object_release(PGG(default_link)); in php_pgsql_set_default_link()
306 PGG(default_link) = obj; in php_pgsql_set_default_link()
323 PGG(num_persistent)--; in _close_pgsql_plink()
324 PGG(num_links)--; in _close_pgsql_plink()
331 if (PGG(ignore_notices)) { in _php_pgsql_notice_handler()
343 if (PGG(log_notices)) { in _php_pgsql_notice_handler()
372 int orig = PGG(ignore_notices); in _rollback_transactions()
373 PGG(ignore_notices) = 1; in _rollback_transactions()
376 PGG(ignore_notices) = orig; in _rollback_transactions()
493 zend_hash_destroy(&PGG(connections)); in PHP_MSHUTDOWN_FUNCTION()
500 PGG(default_link) = NULL; in PHP_RINIT_FUNCTION()
501 PGG(num_links) = PGG(num_persistent); in PHP_RINIT_FUNCTION()
502 zend_hash_init(&PGG(field_oids), 0, NULL, release_string, 0); in PHP_RINIT_FUNCTION()
503 zend_hash_init(&PGG(table_oids), 0, NULL, release_string, 0); in PHP_RINIT_FUNCTION()
509 if (PGG(default_link)) { in PHP_RSHUTDOWN_FUNCTION()
510 zend_object_release(PGG(default_link)); in PHP_RSHUTDOWN_FUNCTION()
511 PGG(default_link) = NULL; in PHP_RSHUTDOWN_FUNCTION()
514 zend_hash_destroy(&PGG(field_oids)); in PHP_RSHUTDOWN_FUNCTION()
515 zend_hash_destroy(&PGG(table_oids)); in PHP_RSHUTDOWN_FUNCTION()
533 snprintf(buf, sizeof(buf), ZEND_LONG_FMT, PGG(num_persistent)); in PHP_MINFO_FUNCTION()
535 snprintf(buf, sizeof(buf), ZEND_LONG_FMT, PGG(num_links)); in PHP_MINFO_FUNCTION()
564 if (persistent && PGG(allow_persistent)) { in php_pgsql_do_connect()
569 if (PGG(max_links) != -1 && PGG(num_links) >= PGG(max_links)) { in php_pgsql_do_connect()
571 "Cannot create new link. Too many open links (" ZEND_LONG_FMT ")", PGG(num_links)); in php_pgsql_do_connect()
574 if (PGG(max_persistent) != -1 && PGG(num_persistent) >= PGG(max_persistent)) { in php_pgsql_do_connect()
576 …"Cannot create new link. Too many open persistent links (" ZEND_LONG_FMT ")", PGG(num_persistent)); in php_pgsql_do_connect()
594 PGG(num_links)++; in php_pgsql_do_connect()
595 PGG(num_persistent)++; in php_pgsql_do_connect()
601 if (PGG(auto_reset_persistent) & 1) { in php_pgsql_do_connect()
644 && (index_ptr = zend_hash_find(&PGG(connections), str.s)) != NULL) { in php_pgsql_do_connect()
650 if (PGG(max_links) != -1 && PGG(num_links) >= PGG(max_links)) { in php_pgsql_do_connect()
651 …ULL, E_WARNING, "Cannot create new link. Too many open links (" ZEND_LONG_FMT ")", PGG(num_links)); in php_pgsql_do_connect()
684 zend_hash_update(&PGG(connections), str.s, return_value); in php_pgsql_do_connect()
691 PGG(num_links)++; in php_pgsql_do_connect()
694 if (! PGG(ignore_notices) && Z_TYPE_P(return_value) == IS_OBJECT) { in php_pgsql_do_connect()
758 zend_object_release(PGG(default_link)); in PHP_FUNCTION()
759 PGG(default_link) = NULL; in PHP_FUNCTION()
767 GC_DELREF(PGG(default_link)); in PHP_FUNCTION()
768 PGG(default_link) = NULL; in PHP_FUNCTION()
1009 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
1127 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
1208 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
1312 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
1462 zend_string *ret = zend_hash_index_find_ptr(&PGG(field_oids), oid); in get_field_name()
1494 zend_hash_index_update_ptr(&PGG(field_oids), tmp_oid, name); in get_field_name()
1538 zend_string *field_table = zend_hash_index_find_ptr(&PGG(table_oids), oid); in PHP_FUNCTION()
1565 zend_hash_index_update_ptr(&PGG(table_oids), oid, field_table); in PHP_FUNCTION()
3634 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
3726 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
3797 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
3895 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) { in PHP_FUNCTION()
5417 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pg_link) != CONNECTION_OK) { in PHP_FUNCTION()