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()
246 if (!stmt->executed && (!stmt->column_count || S->cols == NULL)) { in pgsql_stmt_execute()
248 S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column)); in pgsql_stmt_execute()
467 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_describe() local
476 cols[colno].name = zend_string_init(str, strlen(str), 0); in pgsql_stmt_describe()
477 cols[colno].maxlen = PQfsize(S->result, colno); in pgsql_stmt_describe()
478 cols[colno].precision = PQfmod(S->result, colno); in pgsql_stmt_describe()
479 S->cols[colno].pgsql_type = PQftype(S->result, colno); in pgsql_stmt_describe()
481 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_describe()
484 cols[colno].param_type = PDO_PARAM_BOOL; in pgsql_stmt_describe()
491 (param = zend_hash_find_ptr(stmt->bound_columns, cols[colno].name)) != NULL)) { in pgsql_stmt_describe()
494 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
498 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
503 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
508 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
510 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
515 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
519 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
528 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_get_col() local
543 switch (cols[colno].param_type) { in pgsql_stmt_get_col()
546 ZEND_ATOL(S->cols[colno].intval, *ptr); in pgsql_stmt_get_col()
547 *ptr = (char *) &(S->cols[colno].intval); in pgsql_stmt_get_col()
552 S->cols[colno].boolval = **ptr == 't' ? 1: 0; in pgsql_stmt_get_col()
553 *ptr = (char *) &(S->cols[colno].boolval); in pgsql_stmt_get_col()
558 if (S->cols[colno].pgsql_type == OIDOID) { in pgsql_stmt_get_col()
648 add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
657 switch (S->cols[colno].pgsql_type) { in pgsql_stmt_get_column_meta()
687 spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
703 if (S->cols != NULL){ in pdo_pgsql_stmt_cursor_closer()
704 efree(S->cols); in pdo_pgsql_stmt_cursor_closer()
705 S->cols = NULL; in pdo_pgsql_stmt_cursor_closer()