summaryrefslogtreecommitdiff
path: root/src/bin/psql/settings.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2016-04-08 20:23:18 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2016-04-08 20:23:18 -0300
commitc09b18f21c52cbcf8718d6c267c84fcfea3739a9 (patch)
tree14ae5d520050d3302c8ecae141a2deda7c17a962 /src/bin/psql/settings.h
parent279d86afdbed550425bc9d1327ade2dc0028ad33 (diff)
Support \crosstabview in psql
\crosstabview is a completely different way to display results from a query: instead of a vertical display of rows, the data values are placed in a grid where the column and row headers come from the data itself, similar to a spreadsheet. The sort order of the horizontal header can be specified by using another column in the query, and the vertical header determines its ordering from the order in which they appear in the query. This only allows displaying a single value in each cell. If more than one value correspond to the same cell, an error is thrown. Merging of values can be done in the query itself, if necessary. This may be revisited in the future. Author: Daniel Verité Reviewed-by: Pavel Stehule, Dean Rasheed
Diffstat (limited to 'src/bin/psql/settings.h')
-rw-r--r--src/bin/psql/settings.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h
index c69f6ba1ec4..643ff8cd5bb 100644
--- a/src/bin/psql/settings.h
+++ b/src/bin/psql/settings.h
@@ -93,6 +93,10 @@ typedef struct _psqlSettings
char *gfname; /* one-shot file output argument for \g */
char *gset_prefix; /* one-shot prefix argument for \gset */
bool gexec_flag; /* one-shot flag to execute query's results */
+ bool crosstab_flag; /* one-shot request to crosstab results */
+ char *ctv_col_V; /* \crosstabview 1st argument */
+ char *ctv_col_H; /* \crosstabview 2nd argument */
+ char *ctv_col_D; /* \crosstabview 3nd argument */
bool notty; /* stdin or stdout is not a tty (as determined
* on startup) */