Definition at line 107 of file crosstabview.c.
108{
109 bool retval = false;
121
124
126 {
127 pg_log_error(
"\\crosstabview: statement did not return a result set");
129 }
130
132 {
133 pg_log_error(
"\\crosstabview: query must return at least three columns");
135 }
136
137
140 else
141 {
145 }
146
147
150 else
151 {
155 }
156
157
159 {
160 pg_log_error(
"\\crosstabview: vertical and horizontal headers must be different columns");
162 }
163
164
166 {
168
169
170
171
172
173
175 {
176 pg_log_error(
"\\crosstabview: data column must be specified when query returns more than three columns");
178 }
179
182 {
184 {
186 break;
187 }
188 }
190 }
191 else
192 {
196 }
197
198
201 else
202 {
206 }
207
208
209
210
211
212
213
215 {
218
219
223
227
229
231 {
232 pg_log_error(
"\\crosstabview: maximum number of columns (%d) exceeded",
235 }
236
237
240
242 }
243
244
245
246
247
250
252
254
257
258
259
260
261
264
265
266
267
272
278
279 return retval;
280}
#define Assert(condition)
static int avlCollectFields(avl_tree *tree, avl_node *node, pivot_field *fields, int idx)
static void avlFree(avl_tree *tree, avl_node *node)
static bool printCrosstab(const PGresult *result, int num_columns, pivot_field *piv_columns, int field_for_columns, int num_rows, pivot_field *piv_rows, int field_for_rows, int field_for_data)
static void rankSort(int num_columns, pivot_field *piv_columns)
static int indexOfColumn(char *arg, const PGresult *res)
static void avlInit(avl_tree *tree)
static void avlMergeValue(avl_tree *tree, char *name, char *sort_value)
#define CROSSTABVIEW_MAX_COLUMNS
#define pg_malloc_array(type, count)
#define pg_log_error(...)
References Assert, avlCollectFields(), avlFree(), avlInit(), avlMergeValue(), CROSSTABVIEW_MAX_COLUMNS, _psqlSettings::ctv_args, fb(), i, indexOfColumn(), pg_free(), pg_log_error, pg_malloc_array, PGRES_TUPLES_OK, PQgetisnull, PQgetvalue, PQnfields, PQntuples, PQresultStatus, printCrosstab(), pset, rankSort(), and val.
Referenced by PrintQueryResult().