PostgreSQL Source Code  git master
crosstabview.h
Go to the documentation of this file.
1 /*
2  * psql - the PostgreSQL interactive terminal
3  *
4  * Copyright (c) 2000-2017, PostgreSQL Global Development Group
5  *
6  * src/bin/psql/crosstabview.h
7  */
8 
9 #ifndef CROSSTABVIEW_H
10 #define CROSSTABVIEW_H
11 
12 /*
13  * Limit the number of output columns generated in memory by the crosstabview
14  * algorithm. A new output column is added for each distinct value found in the
15  * column that pivots (to form the horizontal header).
16  * The purpose of this limit is to fail early instead of over-allocating or spending
17  * too much time if the crosstab to generate happens to be unreasonably large
18  * (worst case: a NxN cartesian product with N=number of tuples).
19  * The value of 1600 corresponds to the maximum columns per table in storage,
20  * but it could be as much as INT_MAX theorically.
21  */
22 #define CROSSTABVIEW_MAX_COLUMNS 1600
23 
24 /* prototypes */
25 extern bool PrintResultsInCrosstab(const PGresult *res);
26 
27 #endif /* CROSSTABVIEW_H */
bool PrintResultsInCrosstab(const PGresult *res)
Definition: crosstabview.c:103