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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: e6d8cb7) | patch
Allow to push down clauses from HAVING to WHERE when grouping sets are used.
2015年7月26日 13:56:26 +0000 (15:56 +0200)
2015年7月26日 14:50:20 +0000 (16:50 +0200)
commit 61444bfb809d3a088a270a59f383af3d4cd157b0
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.
src/backend/optimizer/plan/planner.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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