pgsql: Support \crosstabview in psql
От | Alvaro Herrera |
---|---|
Тема | pgsql: Support \crosstabview in psql |
Дата | |
Msg-id | E1aoflE-0001Dx-D1@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/c09b18f21c52cbcf8718d6c267c84fcfea3739a9 Modified Files -------------- doc/src/sgml/ref/psql-ref.sgml | 141 ++++++ src/bin/psql/Makefile | 2 +- src/bin/psql/command.c | 15 + src/bin/psql/common.c | 26 +- src/bin/psql/crosstabview.c | 878 +++++++++++++++++++++++++++++++++++++ src/bin/psql/crosstabview.h | 26 ++ src/bin/psql/help.c | 1 + src/bin/psql/settings.h | 4 + src/bin/psql/tab-complete.c | 3 +- src/fe_utils/print.c | 50 ++- src/include/fe_utils/print.h | 2 + src/test/regress/expected/psql.out | 189 ++++++++ src/test/regress/sql/psql.sql | 105 +++++ 13 files changed, 1415 insertions(+), 27 deletions(-)
В списке pgsql-committers по дате отправления: