1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Reuse abbreviated keys in ordered [set] aggregates.

When processing ordered aggregates following a sort that could make use
of the abbreviated key optimization, only call the equality operator to
compare successive pairs of tuples when their abbreviated keys were not
equal.

Peter Geoghegan, reviewd by Andreas Karlsson and by me.
This commit is contained in:
Robert Haas
2016-02-17 15:40:00 +05:30
parent 66f503868b
commit f1f5ec1efa
6 changed files with 92 additions and 39 deletions

View File

@ -137,7 +137,7 @@ ExecSort(SortState *node)
slot = node->ss.ps.ps_ResultTupleSlot;
(void) tuplesort_gettupleslot(tuplesortstate,
ScanDirectionIsForward(dir),
slot);
slot, NULL);
return slot;
}