Re: [patch] Proposal for \rotate in psql - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [patch] Proposal for \rotate in psql
Date
Msg-id CAFj8pRCHMj2NdwaG+uJzSbi9NV=+eQw5_ZxaYzoZr+Qm=U-AdA@mail.gmail.com
Whole thread Raw
In response to Re: [patch] Proposal for \rotate in psql  ("Daniel Verite" <daniel@manitou-mail.org>)
List 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 by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [patch] Proposal for \rotate in psql
Next
From: Christopher Browne
Date:
Subject: Re: psql - -dry-run option