Lines Matching refs:oid

68 #define PGSQL_RETURN_OID(oid) do { \  argument
69 if (oid > ZEND_LONG_MAX) { \
70 RETURN_STR(zend_ulong_to_str(oid)); \
72 RETURN_LONG((zend_long)oid); \
75 #define PGSQL_RETURN_OID(oid) RETURN_LONG((zend_long)oid) argument
1453 static inline bool is_valid_oid_string(zend_string *oid, Oid *return_oid) in is_valid_oid_string() argument
1456 *return_oid = (Oid) strtoul(ZSTR_VAL(oid), &end_ptr, 10); in is_valid_oid_string()
1457 return ZSTR_VAL(oid) + ZSTR_LEN(oid) == end_ptr; in is_valid_oid_string()
1460 static zend_string *get_field_name(PGconn *pgsql, Oid oid) in get_field_name() argument
1462 zend_string *ret = zend_hash_index_find_ptr(&PGG(field_oids), oid); in get_field_name()
1495 if (!ret && tmp_oid == oid) { in get_field_name()
1529 Oid oid = PQftable(pg_result->result, (int)fnum); in PHP_FUNCTION() local
1530 if (InvalidOid == oid) { in PHP_FUNCTION()
1535 PGSQL_RETURN_OID(oid); in PHP_FUNCTION()
1538 zend_string *field_table = zend_hash_index_find_ptr(&PGG(table_oids), oid); in PHP_FUNCTION()
1546 smart_str_append_unsigned(&querystr, oid); in PHP_FUNCTION()
1565 zend_hash_index_update_ptr(&PGG(table_oids), oid, field_table); in PHP_FUNCTION()
1584 Oid oid; in php_pgsql_get_field_info() local
1617 oid = PQftype(pgsql_result, (int)field); in php_pgsql_get_field_info()
1618 PGSQL_RETURN_OID(oid); in php_pgsql_get_field_info()
2130 Oid oid; in PHP_FUNCTION() local
2140 oid = PQoidValue(pgsql_result); in PHP_FUNCTION()
2141 if (oid == InvalidOid) { in PHP_FUNCTION()
2144 PGSQL_RETURN_OID(oid); in PHP_FUNCTION()
2232 zval *pgsql_link = NULL, *oid = NULL; in PHP_FUNCTION() local
2237 if (zend_parse_parameters(ZEND_NUM_ARGS(), "|zz", &pgsql_link, &oid) == FAILURE) { in PHP_FUNCTION()
2243 oid = pgsql_link; in PHP_FUNCTION()
2260 if (oid) { in PHP_FUNCTION()
2261 switch (Z_TYPE_P(oid)) { in PHP_FUNCTION()
2264 if (!is_valid_oid_string(Z_STR_P(oid), &wanted_oid)) { in PHP_FUNCTION()
2272 if (Z_LVAL_P(oid) < (zend_long)InvalidOid) { in PHP_FUNCTION()
2276 wanted_oid = (Oid)Z_LVAL_P(oid); in PHP_FUNCTION()
2279 zend_type_error("OID value must be of type string|int, %s given", zend_zval_value_name(oid)); in PHP_FUNCTION()
2306 Oid oid; in PHP_FUNCTION() local
2311 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2325 oid = (Oid)oid_long; in PHP_FUNCTION()
2330 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2344 oid = (Oid)oid_long; in PHP_FUNCTION()
2355 if (lo_unlink(pgsql, oid) == -1) { in PHP_FUNCTION()
2356 php_error_docref(NULL, E_WARNING, "Unable to delete PostgreSQL large object %u", oid); in PHP_FUNCTION()
2371 Oid oid; in PHP_FUNCTION() local
2380 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2394 oid = (Oid)oid_long; in PHP_FUNCTION()
2400 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2414 oid = (Oid)oid_long; in PHP_FUNCTION()
2446 if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) { in PHP_FUNCTION()
2448 if ((oid = lo_creat(pgsql, INV_READ|INV_WRITE)) == 0) { in PHP_FUNCTION()
2452 if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) { in PHP_FUNCTION()
2453 if (lo_unlink(pgsql, oid) == -1) { in PHP_FUNCTION()
2603 zval *pgsql_link = NULL, *oid = NULL; in PHP_FUNCTION() local
2610 "OP|z", &pgsql_link, pgsql_link_ce, &file_in, &oid) == SUCCESS) { in PHP_FUNCTION()
2615 "P|z", &file_in, &oid) == SUCCESS) { in PHP_FUNCTION()
2629 if (oid) { in PHP_FUNCTION()
2631 switch (Z_TYPE_P(oid)) { in PHP_FUNCTION()
2634 if (!is_valid_oid_string(Z_STR_P(oid), &wanted_oid)) { in PHP_FUNCTION()
2642 if (Z_LVAL_P(oid) < (zend_long)InvalidOid) { in PHP_FUNCTION()
2646 wanted_oid = (Oid)Z_LVAL_P(oid); in PHP_FUNCTION()
2649 zend_type_error("OID value must be of type string|int, %s given", zend_zval_value_name(oid)); in PHP_FUNCTION()
2678 Oid oid; in PHP_FUNCTION() local
2689 oid = (Oid)oid_long; in PHP_FUNCTION()
2695 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2709 oid = (Oid)oid_long; in PHP_FUNCTION()
2715 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2734 if (lo_export(pgsql, oid, ZSTR_VAL(file_out)) == -1) { in PHP_FUNCTION()