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 CAFj8pRCWqWT-dVbNRR4JAyWu=BheB3ZzXSfE6vYUNiaj4wfEHQ@mail.gmail.com
Whole thread
In response to Re: [patch] Proposal for \rotate in psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: [patch] Proposal for \rotate in psql
Re: [patch] Proposal for \rotate in psql
Re: [patch] Proposal for \rotate in psql
List pgsql-hackers

Hi

2015-09-16 11:35 GMT+02:00 Daniel Verite <daniel@manitou-mail.org>:
  Hi,

This is the 2nd iteration of this patch, for comments and review.




my comments:

1. I don't understand why you are use two methods for sorting columns (qsort, and query with ORDER BY)

2. Data column are not well aligned - numbers are aligned as text

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 | ...



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: numbering plan nodes
Next
From: Robert Haas
Date:
Subject: Re: On-demand running query plans using auto_explain and signals