BUG #13863: Select from views gives wrong results

From: wrb(at)autistici(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13863: Select from views gives wrong results
Date: 2016-01-13 18:35:58
Message-ID: 20160113183558.12989.56904@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13863
Logged by: W
Email address: wrb(at)autistici(dot)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!

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2016-01-13 19:27:27 Re: BUG #13862: Duplicated rows for a table with primary key
Previous Message y.chaitanya 2016-01-13 16:51:44 BUG #13862: Duplicated rows for a table with primary key