Lines Matching refs:cols
124 if(S->cols) { in pgsql_stmt_dtor()
125 efree(S->cols); in pgsql_stmt_dtor()
126 S->cols = NULL; in pgsql_stmt_dtor()
245 if (!stmt->executed && (!stmt->column_count || S->cols == NULL)) { in pgsql_stmt_execute()
247 S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column)); in pgsql_stmt_execute()
471 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_describe() local
480 cols[colno].name = zend_string_init(str, strlen(str), 0); in pgsql_stmt_describe()
481 cols[colno].maxlen = PQfsize(S->result, colno); in pgsql_stmt_describe()
482 cols[colno].precision = PQfmod(S->result, colno); in pgsql_stmt_describe()
483 S->cols[colno].pgsql_type = PQftype(S->result, colno); in pgsql_stmt_describe()
485 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_describe()
488 cols[colno].param_type = PDO_PARAM_BOOL; in pgsql_stmt_describe()
495 (param = zend_hash_find_ptr(stmt->bound_columns, cols[colno].name)) != NULL)) { in pgsql_stmt_describe()
498 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
502 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
507 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
512 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
514 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
519 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
523 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
532 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_get_col() local
547 switch (cols[colno].param_type) { in pgsql_stmt_get_col()
550 ZEND_ATOL(S->cols[colno].intval, *ptr); in pgsql_stmt_get_col()
551 *ptr = (char *) &(S->cols[colno].intval); in pgsql_stmt_get_col()
556 S->cols[colno].boolval = **ptr == 't'; in pgsql_stmt_get_col()
557 *ptr = (char *) &(S->cols[colno].boolval); in pgsql_stmt_get_col()
562 if (S->cols[colno].pgsql_type == OIDOID) { in pgsql_stmt_get_col()
654 add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
664 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_get_column_meta()
694 spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
710 if (S->cols != NULL){ in pdo_pgsql_stmt_cursor_closer()
711 efree(S->cols); in pdo_pgsql_stmt_cursor_closer()
712 S->cols = NULL; in pdo_pgsql_stmt_cursor_closer()