Re: \crosstabview fixes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: \crosstabview fixes
Date
Msg-id 24623.1460579980@sss.pgh.pa.us
Whole thread Raw
In response to Re: \crosstabview fixes  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: \crosstabview fixes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
> 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.

That would be OK with me; it's certainly less of a hack than what's
there now.  (I went back and forth about how much effort to put into
dealing with the colon syntax; I think the version I have in my patch
would be all right, but it's not perfect.)

> 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]

Uh, why not

\crosstabview [ colV colH [ colD [ scolH ]]]

I see no particular reason that the existing abbreviation styles aren't
good.  In any case, forcing colD to be specified is kind of annoying ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [patch] \crosstabview documentation
Next
From: Tom Lane
Date:
Subject: Re: \crosstabview fixes