Lines Matching refs:cols
126 if(S->cols) { in pgsql_stmt_dtor()
127 efree(S->cols); in pgsql_stmt_dtor()
128 S->cols = NULL; in pgsql_stmt_dtor()
247 if (!stmt->executed && (!stmt->column_count || S->cols == NULL)) { in pgsql_stmt_execute()
249 S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column)); in pgsql_stmt_execute()
473 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_describe() local
482 cols[colno].name = zend_string_init(str, strlen(str), 0); in pgsql_stmt_describe()
483 cols[colno].maxlen = PQfsize(S->result, colno); in pgsql_stmt_describe()
484 cols[colno].precision = PQfmod(S->result, colno); in pgsql_stmt_describe()
485 S->cols[colno].pgsql_type = PQftype(S->result, colno); in pgsql_stmt_describe()
487 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_describe()
490 cols[colno].param_type = PDO_PARAM_BOOL; in pgsql_stmt_describe()
497 (param = zend_hash_find_ptr(stmt->bound_columns, cols[colno].name)) != NULL)) { in pgsql_stmt_describe()
500 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
504 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
509 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
514 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
516 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
521 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
525 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
534 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_get_col() local
549 switch (cols[colno].param_type) { in pgsql_stmt_get_col()
552 ZEND_ATOL(S->cols[colno].intval, *ptr); in pgsql_stmt_get_col()
553 *ptr = (char *) &(S->cols[colno].intval); in pgsql_stmt_get_col()
558 S->cols[colno].boolval = **ptr == 't' ? 1: 0; in pgsql_stmt_get_col()
559 *ptr = (char *) &(S->cols[colno].boolval); in pgsql_stmt_get_col()
564 if (S->cols[colno].pgsql_type == OIDOID) { in pgsql_stmt_get_col()
656 add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
666 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_get_column_meta()
696 spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
712 if (S->cols != NULL){ in pdo_pgsql_stmt_cursor_closer()
713 efree(S->cols); in pdo_pgsql_stmt_cursor_closer()
714 S->cols = NULL; in pdo_pgsql_stmt_cursor_closer()