Re: [PATCH] explain sortorder

From: Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com>
To: "Timmer, Marius" <marius(dot)timmer(at)uni-muenster(dot)de>
Cc: pgsql-hackerspostgresqlorg <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] explain sortorder
Date: 2015-01-07 18:51:49
Message-ID: CANPAkgvGG2LgRrvc6CtAZrwX7nGe6R6pXdJ6vc9bBMBtE6nnRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

V6 of this patch applies, builds and checks against the current HEAD. The
areas below could use some attention.

In explain.c:

malloc() should not be called directly here. palloc() would be the
correct call, I believe, but the functions in stringinfo.h are probably
your best choice as they remove the necessity for dealing with buffer size
and overflow.

There is leftover commented out code from the previous patch version in
the T_Sort case.

In show_sort_group_keys(), the splitting of the existing declaration and
initialization of the keyresno and target seems unnecessary and against the
style of surrounding code.

Multi-line comments should follow the existing format.

There are no tests for the "... is LC_COLLATE" and "COLLATE..." cases.

Section 14.1 of the documentation may need to be updated.

Mike.

__________________________________________________________________________________
*Mike Blackwell | Technical Analyst, Distribution Services/Rollout
Management | RR Donnelley*
1750 Wallace Ave | St Charles, IL 60174-3401
Office: 630.313.7818
Mike(dot)Blackwell(at)rrd(dot)com
http://www.rrdonnelley.com

<http://www.rrdonnelley.com/>
* <Mike(dot)Blackwell(at)rrd(dot)com>*

On Wed, Jan 7, 2015 at 10:17 AM, Timmer, Marius <
marius(dot)timmer(at)uni-muenster(dot)de> wrote:

> Hi,
>
> we have spent the last days to realize your suggestions in the patch.
> It affects the result of a EXPLAIN-Statement (even in non-verbose-mode).
> Now you will get the order-information for every single sort-key which is
> not ordered by the defaults.
>
>
> best regards,
>
> Marius
>
>
>
>
> ---
> Marius Timmer
> Zentrum für Informationsverarbeitung
> Westfälische Wilhelms-Universität Münster
> Einsteinstraße 60
>
> mtimm_01(at)uni-muenster(dot)de
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-01-07 19:07:13 Re: 9.5: Better memory accounting, towards memory-bounded HashAgg
Previous Message Robert Haas 2015-01-07 17:33:56 Re: parallel mode and parallel contexts