git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 60a1d96) | patch
Repair breakage of aggregate FILTER option.
2017年10月16日 19:24:36 +0000 (15:24 -0400)
2017年10月16日 19:24:36 +0000 (15:24 -0400)
commit c3dfe0fec01469b8a7de327303cad50ba8ed338a
Repair breakage of aggregate FILTER option.

An aggregate's input expression(s) are not supposed to be evaluated
at all for a row where its FILTER test fails ... but commit 8ed3f11bb
overlooked that requirement. Reshuffle so that aggregates having a
filter clause evaluate their arguments separately from those without.
This still gets the benefit of doing only one ExecProject in the
common case of multiple Aggrefs, none of which have filters.

While at it, arrange for filter clauses to be included in the common
ExecProject evaluation, thus perhaps buying a little bit even when
there are filters.

Back-patch to v10 where the bug was introduced.

Discussion: https://postgr.es/m/30065.1508161354@sss.pgh.pa.us
src/backend/executor/nodeAgg.c diff | blob | blame | history
src/include/nodes/execnodes.h diff | blob | blame | history
src/test/regress/expected/aggregates.out diff | blob | blame | history
src/test/regress/sql/aggregates.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /