pgsql: Rethink \crosstabview's argument parsing logic. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Rethink \crosstabview's argument parsing logic.
Date
Msg-id E1aqtu6-0006DQ-2D@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Remove trailing commas in enums.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix memory leak in GIN index scans.