Reuse abbreviated keys in ordered [set] aggregates.
authorRobert Haas <rhaas@postgresql.org>
Wed, 17 Feb 2016 10:10:00 +0000 (15:40 +0530)
committerRobert Haas <rhaas@postgresql.org>
Wed, 17 Feb 2016 10:10:00 +0000 (15:40 +0530)
commitf1f5ec1efafe74ca45e24e0bf3371b1d6985c8ee
treeeab628891c0c2250d87bc703e27af7ca88fb9c0f
parent66f503868b2ac1163aaf48a2f76d8be02af0bc81
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.
src/backend/catalog/index.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeSort.c
src/backend/utils/adt/orderedsetaggs.c
src/backend/utils/sort/tuplesort.c
src/include/utils/tuplesort.h