pgsql: Rethink \crosstabview's argument parsing logic.

Started by Tom Laneabout 10 years ago1 messagescomitters
Jump to latest
#1Tom 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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6f0d6a507889d94a79c0d18577a0cb1ccc2b6815

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 30 +--
src/bin/psql/command.c | 10 +-
src/bin/psql/common.c | 17 +-
src/bin/psql/crosstabview.c | 326 ++++++++--------------------
src/bin/psql/settings.h | 4 +-
src/test/regress/expected/psql_crosstab.out | 38 +++-
src/test/regress/sql/psql_crosstab.sql | 22 +-
7 files changed, 156 insertions(+), 291 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers