Lines Matching refs:cols

107 	if(S->cols) {  in pgsql_stmt_dtor()
108 efree(S->cols); in pgsql_stmt_dtor()
109 S->cols = NULL; in pgsql_stmt_dtor()
227 if (!stmt->executed && (!stmt->column_count || S->cols == NULL)) { in pgsql_stmt_execute()
229 S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column)); in pgsql_stmt_execute()
432 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_describe() local
439 cols[colno].name = estrdup(PQfname(S->result, colno)); in pgsql_stmt_describe()
440 cols[colno].namelen = strlen(cols[colno].name); in pgsql_stmt_describe()
441 cols[colno].maxlen = PQfsize(S->result, colno); in pgsql_stmt_describe()
442 cols[colno].precision = PQfmod(S->result, colno); in pgsql_stmt_describe()
443 S->cols[colno].pgsql_type = PQftype(S->result, colno); in pgsql_stmt_describe()
445 switch(S->cols[colno].pgsql_type) { in pgsql_stmt_describe()
448 cols[colno].param_type = PDO_PARAM_BOOL; in pgsql_stmt_describe()
457 cols[colno].name, cols[colno].namelen, in pgsql_stmt_describe()
460 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
464 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
469 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
474 cols[colno].param_type = PDO_PARAM_INT; in pgsql_stmt_describe()
476 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
481 cols[colno].param_type = PDO_PARAM_LOB; in pgsql_stmt_describe()
485 cols[colno].param_type = PDO_PARAM_STR; in pgsql_stmt_describe()
494 struct pdo_column_data *cols = stmt->columns; in pgsql_stmt_get_col() local
509 switch(cols[colno].param_type) { in pgsql_stmt_get_col()
512 S->cols[colno].intval = atol(*ptr); in pgsql_stmt_get_col()
513 *ptr = (char *) &(S->cols[colno].intval); in pgsql_stmt_get_col()
518 S->cols[colno].boolval = **ptr == 't' ? 1: 0; in pgsql_stmt_get_col()
519 *ptr = (char *) &(S->cols[colno].boolval); in pgsql_stmt_get_col()
524 if (S->cols[colno].pgsql_type == OIDOID) { in pgsql_stmt_get_col()
586 add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
589 spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type); in pgsql_stmt_get_column_meta()
617 if (S->cols != NULL){ in pdo_pgsql_stmt_cursor_closer()
618 efree(S->cols); in pdo_pgsql_stmt_cursor_closer()
619 S->cols = NULL; in pdo_pgsql_stmt_cursor_closer()