Re: [PATCH] explain sortorder

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: "Timmer, Marius" <marius(dot)timmer(at)uni-muenster(dot)de>
Cc: Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com>, pgsql-hackerspostgresqlorg <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] explain sortorder
Date: 2014-12-17 15:34:49
Message-ID: 5491A299.5060904@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/15/2014 06:49 PM, Mike Blackwell wrote:
> QUERY PLAN
> ------------------------------------------------
> Sort
> Output: n1, n2, ((n1)::character(1))
> Sort Key: sortordertest.n1, sortordertest.n2
> Sort Order: ASC NULLS LAST, ASC NULLS LAST
> -> Seq Scan on public.sortordertest
> Output: n1, n2, n1
> (6 rows)

I don't like this output. If there are a lot of sort keys, it gets
difficult to match the right ASC/DESC element to the sort key it applies
to. (Also, there seems to be double-spaces in the list)

I would suggest just adding the information to the Sort Key line. As
long as you don't print the modifiers when they are defaults (ASC and
NULLS LAST), we could print the information even in non-VERBOSE mode. So
it would look something like:

Sort Key: sortordertest.n1 NULLS FIRST, sortordertest.n2 DESC

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-12-17 15:42:57 Re: [PATCH] explain sortorder
Previous Message David Fetter 2014-12-17 15:24:07 Re: POLA violation with \c service=