Re: Add proper planner support for ORDER BY / DISTINCT aggregates

Ranier Vilela <ranier.vf@gmail.com>

From: Ranier Vilela <ranier.vf@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-14T01:45:22Z
Lists: pgsql-hackers
Em ter., 13 de jul. de 2021 às 22:15, David Rowley <dgrowleyml@gmail.com>
escreveu:

> On Tue, 13 Jul 2021 at 23:45, Ranier Vilela <ranier.vf@gmail.com> wrote:
> > The question not answered is if *argno* can '>=' that
> pertrans->numTransInputs,
> > before entering the loop?
> > If *can*, the loop might be useless in that case.
> >
> >>
> >>
> >> Note that we're doing argno++ inside the loop.
> >
> > Another question is, if *argno* can '>' that pertrans->numTransInputs,
> > before the loop, the test will fail?
> > if (argno == pertrans->numTransInputs)
>
> argno is *always* 0 before the loop starts.
>
Good. Thanks.

regards,
Ranier Vilela

Commits

  1. Don't presort ORDER BY/DISTINCT Aggrefs with volatile functions

  2. Add enable_presorted_aggregate GUC

  3. Remove pessimistic cost penalization from Incremental Sort

  4. Fix hypothetical problem passing the wrong GROUP BY pathkeys

  5. Remove unused fields from ExprEvalStep

  6. Improve performance of ORDER BY / DISTINCT aggregates

  7. Refactor function parse_subscription_options.