The following bug has been logged on the website:
Bug reference: 13863
Logged by: W
Email address: wrb@autistici.org
PostgreSQL version: 9.5.0
Operating system: Mac OS X 10.11.2 (postgres is from homebrew)
Description:
Hello,
I noticed strange behavior while using views with the new grouping sets
functionality.
Steps to reproduce are here:
https://gist.github.com/wrb/a73f45dcd335c8bc166c
On my machine, selecting from view gives zero results while selecting from
materialize view (or using CTE) gives the correct result. There's nothing
unusual in log.
Looking at explain analyze function, it seems that the filter is pushed too
deep and removes rows from the original table and not from the aggreage. It
works correctly when using CTE.
Thanks!