Tom Lane wrote:

> I noticed that the \crosstabview documentation asserts that column name
> arguments are handled per standard SQL semantics.  In point of fact,
> though, the patch expends a couple hundred lines to implement what is
> NOT standard SQL semantics: matching unquoted names case-insensitively
> is anything but that.  I think we should rip all that out and do it as
> per attached.  (I also took the trouble to make the error messages conform
> to project style.)
> Comments/objections?

+1 for ripping it out in favor of the option parser with OT_SQLID,
but then there's a problem with the colH:scolH syntax.
For instance when refering to columns by positions, with the
patch applied, it accepts this invocation without error:
  \crosstabview 1 "2:4" 3
whereas before it produced this error:
 Invalid column name: "2:4"

To avoid the confusion between "2:4" and "2":"4" or 2:4,
and the ambiguity with a possibly existing "2:4" column,
maybe we should abandon this syntax and require the optional
scolH to be on its own at the end of the command.

The simplified invocation of the command would be
  \crosstabview colV colH colD [scolH]
(without any default, just scolH being optional):

Or if it's preferrable to have colH just near scolH:
  \crosstabview colD colV colH [scolH]

Best regards,
Daniel Vérité
PostgreSQL-powered mailer:
Twitter: @DanielVerite

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to