]> granicus.if.org Git - postgresql/commit
Recognize GROUPING() as a aggregate expression.
authorAndres Freund <andres@anarazel.de>
Sun, 26 Jul 2015 13:34:29 +0000 (15:34 +0200)
committerAndres Freund <andres@anarazel.de>
Sun, 26 Jul 2015 14:53:13 +0000 (16:53 +0200)
commit3500d1cc78f61927e05c0e73158b87ff24f81c09
tree9c17d76fbb254e9d45c835f62d601915187d3de4
parent65b86c1767a7dac0cc79dcfba7ba4cbd326dc03f
Recognize GROUPING() as a aggregate expression.

Previously GROUPING() was not recognized as a aggregate expression,
erroneously allowing the planner to move it from HAVING to WHERE.

Author: Jeevan Chalke
Reviewed-By: Andrew Gierth
Discussion: CAM2+6=WG9omG5rFOMAYBweJxmpTaapvVp5pCeMrE6BfpCwr4Og@mail.gmail.com
Backpatch: 9.5, where grouping sets were introduced
src/backend/optimizer/util/clauses.c
src/test/regress/expected/groupingsets.out
src/test/regress/sql/groupingsets.sql