Re: Improper const-evaluation of HAVING with grouping sets and subquery pullup

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Improper const-evaluation of HAVING with grouping sets and subquery pullup
Date: 2017-10-19 04:19:37
Message-ID: 878tg7yf1e.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

Tom> I don't think I buy this explanation, because the plan tree
Tom> doesn't show any indication that we're actually folding (g,g) to
Tom> (g):

Huh. Yes, you're right.

Tom> Digression: this seems like another example in which the "same"
Tom> Var can represent two different values.

At one point in the evolution of the GS patch it had a new node type,
GroupedVar or some such name, to represent the possibly-nulled-out
values. I'm not sure that it was being introduced early enough in
planning to have prevented this problem (I suspect not, I'd have to dig
up the old code). That stuff was all ripped out very late in the
development process because as I recall, both you and Andres disliked
it.

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Farina 2017-10-19 05:47:46 Re: pgbouncer-1.7.2-7.rhel6.x86_64.rpm fails to install on AMI
Previous Message Michael Paquier 2017-10-19 02:07:03 Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much