Re: [patch] Proposal for \rotate in psql
От | Pavel Stehule |
---|---|
Тема | Re: [patch] Proposal for \rotate in psql |
Дата | |
Msg-id | CAFj8pRAyEmvgKHBd+7_pOz4f-JQXYvKQjUdoux9UFuUUyGweUw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [patch] Proposal for \rotate in psql (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: [patch] Proposal for \rotate in psql
(Pavel Stehule <pavel.stehule@gmail.com>)
|
Список | pgsql-hackers |
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]
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)
RegardsPavel
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite
В списке pgsql-hackers по дате отправления:
Предыдущее
От: Robert HaasДата:
Сообщение: Re: mdnblocks() sabotages error checking in _mdfd_getseg()
Следующее
От: Tom LaneДата:
Сообщение: Re: [sqlsmith] Failed to generate plan on lateral subqueries