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 CAFj8pRDQ4Rd=hphjuZZy5wu4N-quaWtfgcvdV_8nMcoJq=gaag@mail.gmail.com
Whole thread Raw
In response to Re: [patch] Proposal for \rotate in psql  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers



3. When data are multiattribute - then merging together with space separator is not practical

  * important information is lost
  * same transformation can be done as expression, so this feature is useless

Is possible to use one cell per attribute (don't do merge)?

DATA QUERY: SELECT dim1, dim2, sum(x), avg(x) FROM .. GROUP BY dim1, dim2

and result header of rotate can be

DIM1   | dim2_val1/sum | dim2_val1/avg | dim2_val2/sum | dim2_val2/avg | ...

Last point can wait - we don't need to show pivot table with all details perfectly in first step.

The main issue of this patch is name - "rotate" is really pretty strange for me. Please, change it :) - crosstab is much better

Regards

Pavel

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: synchronous_commit = apply
Next
From: Haribabu Kommi
Date:
Subject: Re: Parallel Seq Scan