postgresql/src
Andres Freund 61444bfb80 Allow to push down clauses from HAVING to WHERE when grouping sets are used.
Previously we disallowed pushing down quals to WHERE in the presence of
grouping sets. That's overly restrictive.

We now instead copy quals to WHERE if applicable, leaving the
one in HAVING in place. That's because, at that stage of the planning
process, it's nontrivial to determine if it's safe to remove the one in
HAVING.

Author: Andrew Gierth
Discussion: 874mkt3l59.fsf@news-spur.riddles.org.uk
Backpatch: 9.5, where grouping sets were introduced. This isn't exactly
    a bugfix, but it seems better to keep the branches in sync at this point.
2015-07-26 16:50:20 +02:00
..
backend Allow to push down clauses from HAVING to WHERE when grouping sets are used. 2015-07-26 16:50:20 +02:00
bin Restore use of zlib default compression in pg_dump directory mode. 2015-07-25 17:14:36 -04:00
common
include Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
interfaces Improve handling of out-of-memory in libpq. 2015-07-07 18:44:59 +03:00
makefiles
pl Fix (some of) pltcl memory usage 2015-07-20 14:10:07 +02:00
port Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:14 -04:00
test Recognize GROUPING() as a aggregate expression. 2015-07-26 16:50:02 +02:00
timezone
tools Turn install.bat into a pure one line wrapper fort he perl script. 2015-07-06 22:18:26 +03:00
tutorial
.gitignore
bcc32.mak
DEVELOPERS
Makefile
Makefile.global.in Redirect install output of make check into a log file 2015-07-23 09:44:20 -04:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:26 -04:00
nls-global.mk
win32.mak