Re: [patch] Proposal for \rotate in psql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Greg Stark <stark(at)mit(dot)edu>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] Proposal for \rotate in psql
Date: 2015-12-13 07:14:40
Message-ID: CAFj8pRBkqUfG6oa9D35sBA8_r_zFD9e4KNogFQq7toSc+JvnAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-12-10 19:29 GMT+01:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:

>
>
>
>> postgres=# \crosstabview 4 +month label
>>
>
> Maybe using optional int order column instead label is better - then you
> can do sort on client side
>
> so the syntax can be "\crosstabview VCol [+/-]HCol [[+-]HOrderCol]
>

here is patch - supported syntax: \crosstabview VCol [+/-]HCol [HOrderCol]

Order column should to contains any numeric value. Values are sorted on
client side

Regards

Pavel

>
> Regards
>
> Pavel
>
>
>
>>
>> ┌──────────────────────────┬───────┬───────┬────────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
>> │ customer │ led │ úno │ bře │ dub │ kvě │
>> čen │ čec │ srp │ zář │ říj │ lis │
>>
>> ╞══════════════════════════╪═══════╪═══════╪════════╪═══════╪═══════╪═══════╪═══════╪═══════╪═══════╪═══════╪═══════╡
>> │ A********** │ │ │ │ │
>> │ │ │ │ │ 13000 │ │
>> │ A******** │ │ │ 8000 │ │
>> │ │ │ │ │ │ │
>> │ B***** │ │ │ │ │
>> │ │ │ │ │ │ 3200 │
>> │ B*********************** │ │ │ │ │
>> │ │ │ │ 26200 │ │ │
>> │ B********* │ │ │ │ │
>> │ │ 14000 │ │ │ │ │
>> │ C********** │ │ │ │ 7740 │
>> │ │ │ │ │ │ │
>> │ C*** │ │ │ │ │
>> │ │ │ │ 26000 │ │ │
>> │ C***** │ │ │ │ 12000 │
>> │ │ │ │ │ │ │
>> │ G******* │ 30200 │ 26880 │ 13536 │ 39360 │ 60480 │
>> 54240 │ 44160 │ 16320 │ 29760 │ 22560 │ 20160 │
>> │ G*************** │ │ │ │ │ │
>> 25500 │ │ │ │ │ │
>> │ G********** │ │ │ │ │ │
>> 16000 │ │ │ │ │ │
>> │ I************* │ │ │ │ │
>> │ │ │ 27920 │ │ │ │
>> │ i**** │ │ │ │ 13500 │
>> │ │ │ │ │ │ │
>> │ n********* │ │ │ │ │
>> │ │ 12600 │ │ │ │ │
>> │ Q** │ │ │ │ │ 16700
>> │ │ │ │ │ │ │
>> │ S******* │ │ │ │ │
>> │ │ 8000 │ │ │ │ │
>> │ S******* │ │ │ │ │ 5368
>> │ │ │ │ │ │ │
>> │ s******* │ │ │ 5000 │ 3200 │
>> │ │ │ │ │ │ │
>>
>> └──────────────────────────┴───────┴───────┴────────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
>> (18 rows)
>>
>>
>>
>> Regards
>>
>> Pavel
>>
>>
>>>
>>>
>>>
>>>> Best regards,
>>>> --
>>>> Daniel Vérité
>>>> PostgreSQL-powered mailer: http://www.manitou-mail.org
>>>> Twitter: @DanielVerite
>>>>
>>>
>>>
>>
>

Attachment Content-Type Size
psql-rotate-v6.diff text/plain 33.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-12-13 07:21:36 Re: [patch] Proposal for \rotate in psql
Previous Message Oleg Bartunov 2015-12-13 06:33:44 Re: Disabling an index temporarily