Lines Matching refs:cols

122 	if(S->cols) {  in pgsql_stmt_dtor()
123 efree(S->cols); in pgsql_stmt_dtor()
124 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()
475 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_describe() local
484 cols[colno].name = zend_string_init(str, strlen(str), 0); in pgsql_stmt_describe()
485 cols[colno].maxlen = PQfsize(S->result, colno); in pgsql_stmt_describe()
486 cols[colno].precision = PQfmod(S->result, colno); in pgsql_stmt_describe()
487 S->cols[colno].pgsql_type = PQftype(S->result, colno); in pgsql_stmt_describe()
489 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_describe()
492 cols[colno].param_type = PDO_PARAM_BOOL; in pgsql_stmt_describe()
499 (param = zend_hash_find_ptr(stmt->bound_columns, cols[colno].name)) != NULL)) { in pgsql_stmt_describe()
502 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
506 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
511 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
516 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
518 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
523 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
527 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
536 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_get_col() local
551 switch (cols[colno].param_type) { in pgsql_stmt_get_col()
554 ZEND_ATOL(S->cols[colno].intval, *ptr); in pgsql_stmt_get_col()
555 *ptr = (char *) &(S->cols[colno].intval); in pgsql_stmt_get_col()
560 S->cols[colno].boolval = **ptr == 't'; in pgsql_stmt_get_col()
561 *ptr = (char *) &(S->cols[colno].boolval); in pgsql_stmt_get_col()
566 if (S->cols[colno].pgsql_type == OIDOID) { in pgsql_stmt_get_col()
658 add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
668 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_get_column_meta()
698 spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
714 if (S->cols != NULL){ in pdo_pgsql_stmt_cursor_closer()
715 efree(S->cols); in pdo_pgsql_stmt_cursor_closer()
716 S->cols = NULL; in pdo_pgsql_stmt_cursor_closer()