Rethink \crosstabview's argument parsing logic.
Tom Lane <tgl@sss.pgh.pa.us>
Rethink \crosstabview's argument parsing logic. \crosstabview interpreted its arguments in an unusual way, including doing case-insensitive matching of unquoted column names, which is surely not the right thing. Rip that out in favor of doing something equivalent to the dequoting/case-folding rules used by other psql commands. To keep it simple, change the syntax so that the optional sort column is specified as a separate argument, instead of the also-quite-unusual syntax that attached it to the colH argument with a colon. Also, rework the error messages to be closer to project style.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | modified | +16 −14 |
| src/bin/psql/command.c | modified | +4 −6 |
| src/bin/psql/common.c | modified | +4 −13 |
| src/bin/psql/crosstabview.c | modified | +87 −239 |
| src/bin/psql/settings.h | modified | +1 −3 |
| src/test/regress/expected/psql_crosstab.out | modified | +27 −11 |
| src/test/regress/sql/psql_crosstab.sql | modified | +17 −5 |