2 * psql - the PostgreSQL interactive terminal
4 * Copyright (c) 2000-2025, PostgreSQL Global Development Group
6 * src/bin/psql/crosstabview.h
10 #define CROSSTABVIEW_H
15 * Limit the number of output columns generated in memory by the crosstabview
16 * algorithm. A new output column is added for each distinct value found in the
17 * column that pivots (to form the horizontal header).
18 * The purpose of this limit is to fail early instead of over-allocating or spending
19 * too much time if the crosstab to generate happens to be unreasonably large
20 * (worst case: a NxN cartesian product with N=number of tuples).
21 * The value of 1600 corresponds to the maximum columns per table in storage,
22 * but it could be as much as INT_MAX theoretically.
24 #define CROSSTABVIEW_MAX_COLUMNS 1600
27 extern bool PrintResultInCrosstab(const PGresult
*res
);
29 #endif /* CROSSTABVIEW_H */