Обсуждение: pgsql: Don't cache per-group context across the whole query in ordereds

Поиск
Список
Период
Сортировка

pgsql: Don't cache per-group context across the whole query in ordereds

От
Tom Lane
Дата:
Don't cache per-group context across the whole query in orderedsetaggs.c.

Although nodeAgg.c currently uses the same per-group memory context for
all groups of a query, that might change in future.  Avoid assuming it.
This costs us an extra AggCheckCallContext() call per group, but that's
pretty cheap and is probably good from a safety standpoint anyway.

Back-patch to 9.4 in case any third-party code copies this logic.

Andrew Gierth

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/e44964c709b4a5f18d3f9a8fe6d5c259091315c1

Modified Files
--------------
src/backend/utils/adt/orderedsetaggs.c |   28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)