Re: \crosstabview fixes

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: \crosstabview fixes
Дата
Msg-id bd73f3f9-4e1a-452c-b7c8-0029d91e447b@mm
обсуждение исходный текст
Ответ на \crosstabview fixes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: \crosstabview fixes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
    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: http://www.manitou-mail.org
Twitter: @DanielVerite



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <