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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, 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-02-08 09:44:34
Message-ID: 20160208094434.5cz3g2g4fppduwqp@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2016-02-08 09:41:10 +0000, Dean Rasheed wrote:
> On 7 February 2016 at 23:21, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:
> > I think for now the following patch is best. This preserves the ability
> > to push degenerate HAVING clauses through an explicit GROUP BY () as
> > well as an implicit one, but prevents pushdown in all other cases.
> >
> > Includes comment and regression test.
> >
>
> Yes, I think that's probably the best solution for now. Longer term I
> think it might be possible to do better, along the lines discussed
> above, but I haven't had time to explore any of those options.
>
> Note that with this change to the "if" condition, the next "else if"
> condition can be simplified back to just:
>
> else if (parse->groupClause)
> {
> /* move it to WHERE */
> ...

FWIW, I find the current phrasing clearer.

> Andres, are you going to take this one?

Working on it as we speak. I thought you might appreciate doing your
first commit under a littlebit less pressure.

Andres

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2016-02-08 09:57:27 Re: BUG #13863: Select from views gives wrong results
Previous Message Dean Rasheed 2016-02-08 09:41:10 Re: BUG #13863: Select from views gives wrong results