diff options
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 9eae76f7ba8..227d1805d44 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -39,6 +39,7 @@ #include "common.h" #include "copy.h" +#include "crosstabview.h" #include "describe.h" #include "help.h" #include "input.h" @@ -364,6 +365,20 @@ exec_command(const char *cmd, else if (strcmp(cmd, "copyright") == 0) print_copyright(); + /* \crosstabview -- execute a query and display results in crosstab */ + else if (strcmp(cmd, "crosstabview") == 0) + { + pset.ctv_col_V = psql_scan_slash_option(scan_state, + OT_NORMAL, NULL, false); + pset.ctv_col_H = psql_scan_slash_option(scan_state, + OT_NORMAL, NULL, false); + pset.ctv_col_D = psql_scan_slash_option(scan_state, + OT_NORMAL, NULL, false); + + pset.crosstab_flag = true; + status = PSQL_CMD_SEND; + } + /* \d* commands */ else if (cmd[0] == 'd') { |