From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Daniel Verite <daniel(at)manitou-mail(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [patch] Proposal for \rotate in psql |
Date: | 2015-09-18 12:25:19 |
Message-ID: | CAFj8pRDTAA54tCWWSmmSjCKJkOifeRLjqMQcTsReHgxULpYOiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2015-09-18 13:59 GMT+02:00 Daniel Verite <daniel(at)manitou-mail(dot)org>:
> Pavel Stehule wrote:
>
>
> > my comments:
> >
> > 1. I don't understand why you are use two methods for sorting columns
> > (qsort, and query with ORDER BY)
>
> qsort (with strcmp as the comparator) is only used to determine the
> set of distinct values for the vertical and horizontal headers.
> In fact this is just to allow the use of bsearch() when doing that
> instead of a slower sequential search.
>
> Once the values for the horizontal headers are known, they
> are passed to the server for sorting with server-side semantics
> according to their type. The order will differ from qsort/strcmp
> found as the comparison semantics are different.
>
> The values for the vertical header are not sorted server-side
> because we keep the order of the query for displaying
> top to bottom.
> In the typical use case , it will have ORDER BY 1[,2] possibly
> with one/two DESC qualifiers.
>
ok
>
> > 2. Data column are not well aligned - numbers are aligned as text
>
> Yes. I'll look shortly into fixing that.
>
>
> Best regards,
> --
> Daniel Vérité
> PostgreSQL-powered mailer: http://www.manitou-mail.org
> Twitter: @DanielVerite
>
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2015-09-18 12:58:06 | Re: WIP: Rework access method interface |
Previous Message | Amit Kapila | 2015-09-18 12:01:33 | Re: Parallel Seq Scan |