Re: BUG #13863: Select from views gives wrong results

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: wrb <wrb(at)autistici(dot)org>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13863: Select from views gives wrong results
Date: 2016-01-16 17:29:30
Message-ID: CAEZATCWK-XDQxn2L1W6Te0LTu5XRUqyEo57kLQyxLJOG1VTrpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 16 January 2016 at 13:12, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Hm, I'm a bit hesitant to potentially noticeably regress plans here,
> although it seems unikely that already "relies" on this. Can't we
> essentially treat references to columns which can be set to null by due
> to a grouping set, as containing an agg clause and only prevent moving
> in that case?
>

I suppose it could be done, but it seems like a fair bit of work. It
would be a bit like check_ungrouped_columns() except that it would
only be safe to move the clause if it only referred to expressions
that appeared in the intersection of all the grouping sets. I think
that would rule out most real-world examples, including just about
anything using rollup or cube, so I'm not sure it would be worth the
effort.

Regards,
Dean

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alcione Bernardi 2016-01-16 21:47:23 Delete message
Previous Message Tom Lane 2016-01-16 15:28:26 Re: [GENERAL] Re: [BUGS] about test_parser installation failure problem(PostgreSQL in 9.5.0)?