Re: [patch] Proposal for \rotate in psql

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [patch] Proposal for \rotate in psql
Дата
Msg-id CAFj8pRCHMj2NdwaG+uJzSbi9NV=+eQw5_ZxaYzoZr+Qm=U-AdA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [patch] Proposal for \rotate in psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers


2015-12-14 23:15 GMT+01:00 Daniel Verite <daniel@manitou-mail.org>:
        Pavel Stehule wrote:


> here is patch - supported syntax: \crosstabview VCol [+/-]HCol [HOrderCol]
>
> Order column should to contains any numeric value. Values are sorted on
> client side

If I understand correctly, I see a problem with HOrderCol.

If the vertical header consists of, for example, a series of
event names, and it should be sorted  by event date, then
the requirement of HOrderCol being strictly numeric is
problematic,  in a way that the previous proposal was not, isn't it?

I don't think - If you are able to do sort on server side, then you can use window functions and attach some numeric in correct order.

But the situation is more simple probably - usually you are able to transform the field for order to number, so you don't need window functions - the transform function is enough.

Regards

Pavel
 

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [patch] Proposal for \rotate in psql
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: psql - -dry-run option