Lines Matching refs:oid

65 #define PGSQL_RETURN_OID(oid) do { \  argument
66 if (oid > ZEND_LONG_MAX) { \
68 smart_str_append_unsigned(&s, oid); \
72 RETURN_LONG((zend_long)oid); \
75 #define PGSQL_RETURN_OID(oid) RETURN_LONG((zend_long)oid) argument
1478 static inline bool is_valid_oid_string(zend_string *oid, Oid *return_oid) in is_valid_oid_string() argument
1481 *return_oid = (Oid) strtoul(ZSTR_VAL(oid), &end_ptr, 10); in is_valid_oid_string()
1482 return ZSTR_VAL(oid) + ZSTR_LEN(oid) == end_ptr; in is_valid_oid_string()
1486 static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list) in get_field_name() argument
1494 smart_str_append_unsigned(&str, oid); in get_field_name()
1533 if (!ret && strtoul(tmp_oid, &end_ptr, 10)==oid) { in get_field_name()
1552 Oid oid; in PHP_FUNCTION() local
1575 oid = PQftable(pg_result->result, (int)fnum); in PHP_FUNCTION()
1577 if (InvalidOid == oid) { in PHP_FUNCTION()
1582 PGSQL_RETURN_OID(oid); in PHP_FUNCTION()
1587 smart_str_append_unsigned(&hash_key, oid); in PHP_FUNCTION()
1599 smart_str_append_unsigned(&querystr, oid); in PHP_FUNCTION()
1643 Oid oid; in php_pgsql_get_field_info() local
1680 oid = PQftype(pgsql_result, (int)field); in php_pgsql_get_field_info()
1681 PGSQL_RETURN_OID(oid); in php_pgsql_get_field_info()
2206 Oid oid; in PHP_FUNCTION() local
2217 oid = PQoidValue(pgsql_result); in PHP_FUNCTION()
2218 if (oid == InvalidOid) { in PHP_FUNCTION()
2221 PGSQL_RETURN_OID(oid); in PHP_FUNCTION()
2297 zval *pgsql_link = NULL, *oid = NULL; in PHP_FUNCTION() local
2303 if (zend_parse_parameters(argc, "|zz", &pgsql_link, &oid) == FAILURE) { in PHP_FUNCTION()
2309 oid = pgsql_link; in PHP_FUNCTION()
2326 if (oid) { in PHP_FUNCTION()
2327 switch (Z_TYPE_P(oid)) { in PHP_FUNCTION()
2330 if (!is_valid_oid_string(Z_STR_P(oid), &wanted_oid)) { in PHP_FUNCTION()
2338 if (Z_LVAL_P(oid) < (zend_long)InvalidOid) { in PHP_FUNCTION()
2342 wanted_oid = (Oid)Z_LVAL_P(oid); in PHP_FUNCTION()
2345 zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); in PHP_FUNCTION()
2372 Oid oid; in PHP_FUNCTION() local
2378 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2391 oid = (Oid)oid_long; in PHP_FUNCTION()
2395 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2409 oid = (Oid)oid_long; in PHP_FUNCTION()
2422 if (lo_unlink(pgsql, oid) == -1) { in PHP_FUNCTION()
2423 php_error_docref(NULL, E_WARNING, "Unable to delete PostgreSQL large object %u", oid); in PHP_FUNCTION()
2439 Oid oid; in PHP_FUNCTION() local
2449 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2462 oid = (Oid)oid_long; in PHP_FUNCTION()
2467 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2481 oid = (Oid)oid_long; in PHP_FUNCTION()
2515 if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) { in PHP_FUNCTION()
2517 if ((oid = lo_creat(pgsql, INV_READ|INV_WRITE)) == 0) { in PHP_FUNCTION()
2522 if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) { in PHP_FUNCTION()
2523 if (lo_unlink(pgsql, oid) == -1) { in PHP_FUNCTION()
2683 zval *pgsql_link = NULL, *oid = NULL; in PHP_FUNCTION() local
2692 "rp|z", &pgsql_link, &file_in, &name_len, &oid) == SUCCESS) { in PHP_FUNCTION()
2696 "p|z", &file_in, &name_len, &oid) == SUCCESS) { in PHP_FUNCTION()
2712 if (oid) { in PHP_FUNCTION()
2714 switch (Z_TYPE_P(oid)) { in PHP_FUNCTION()
2717 if (!is_valid_oid_string(Z_STR_P(oid), &wanted_oid)) { in PHP_FUNCTION()
2725 if (Z_LVAL_P(oid) < (zend_long)InvalidOid) { in PHP_FUNCTION()
2729 wanted_oid = (Oid)Z_LVAL_P(oid); in PHP_FUNCTION()
2732 zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); in PHP_FUNCTION()
2762 Oid oid; in PHP_FUNCTION() local
2774 oid = (Oid)oid_long; in PHP_FUNCTION()
2779 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2792 oid = (Oid)oid_long; in PHP_FUNCTION()
2798 if (!is_valid_oid_string(oid_string, &oid)) { in PHP_FUNCTION()
2819 if (lo_export(pgsql, oid, file_out) == -1) { in PHP_FUNCTION()