Re: [PATCH] explain sortorder

From: "Timmer, Marius" <marius(dot)timmer(at)uni-muenster(dot)de>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: "Timmer, Marius" <marius(dot)timmer(at)uni-muenster(dot)de>, pgsql-hackerspostgresqlorg <pgsql-hackers(at)postgresql(dot)org>, Arne Scheffer <scheffa(at)uni-muenster(dot)de>
Subject: Re: [PATCH] explain sortorder
Date: 2015-01-14 15:26:02
Message-ID: 175EB07D-E647-4749-96FA-F3BBC688B82D@exchange.wwu.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Heikki,

abbreviated version:
Sorry, the problem is only the unhandy patch text format, not different opinions how to proceed.

Long version:
The v7 patch file already addressed your suggestions,
but the file contained serveral (old) local commits,
the new ones at the end of the patch text/file.

v7.1 is attached and addresses this issue providing a clean patch file.

V8 will - as mentioned - add missing docs and regression tests,
Mike suggested.

VlG-Arne & Marius

---
Marius Timmer
Zentrum für Informationsverarbeitung
Westfälische Wilhelms-Universität Münster
Einsteinstraße 60

mtimm_01(at)uni-muenster(dot)de

Am 13.01.2015 um 18:52 schrieb Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>:

> On 01/13/2015 06:04 PM, Timmer, Marius wrote:
>> -malloc() (StringInfo is used as suggested now).
>
> There really shouldn't be any snprintf() calls in the patch, when StringInfo is used correctly...
>
>> @@ -1187,6 +1187,7 @@ explain (verbose, costs off) select * from matest0 order by 1-id;
>> Sort
>> Output: matest0.id, matest0.name, ((1 - matest0.id))
>> Sort Key: ((1 - matest0.id))
>> + Sort Order: ASC NULLS LAST
>> -> Result
>> Output: matest0.id, matest0.name, (1 - matest0.id)
>> -> Append
>
> This patch isn't going to be committed with this output format. Please change per my suggestion earlier:
>
>> 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
>
> Or if you don't agree with that, explain why.
>
> - Heikki
>

Attachment Content-Type Size
explain_sortorder-v7_1.patch application/octet-stream 11.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-01-14 15:30:23 Re: hung backends stuck in spinlock heavy endless loop
Previous Message Merlin Moncure 2015-01-14 15:22:45 Re: hung backends stuck in spinlock heavy endless loop