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

Поиск
Список
Период
Сортировка
Искать
От
Andrew Gierth
Тема
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup
Дата
Msg-id
87lgkclh7t.fsf@news-spur.riddles.org.uk
Ответ на
Список
Дерево обсуждения
[BUGS] Improper const-evaluation of HAVING with grouping sets and subquerypullup Heikki Linnakangas <hlinnaka@iki.fi>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets andsubquery pullup Heikki Linnakangas <hlinnaka@iki.fi>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets andsubquery pullup Michael Paquier <michael.paquier@gmail.com>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup Andrew Gierth <andrew@tao11.riddles.org.uk>
>>>>> "Tom" == Tom Lane  writes:
Tom> One thing I'm wondering is why only the HAVING clause would beTom> subject to the problem. I'm a bit surprised that the "x" in theTom> targetlist didn't become a constant as well. This may be pointingTom> to some klugery in the GROUPING SETS patch that we could clean upTom> if we use placeholders for this.

This shows that the problem can extend to the targetlist too:

select four, x || 'x' from (select four, ten, 'foo'::text as x from tenk1 ) as tgroup by grouping sets(four, x);
four | ?column? 
------+----------   3 | foox   0 | foox   1 | foox   2 | foox     | foox
(5 rows)

What seems to happen in the original case is that the 'foo' constant
ends up in the projection of the input to the aggregate node, with a Var
in the output.

-- 
Andrew (irc:RhodiumToad)


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления
От: andrew@tao11.riddles.org.uk
Дата:
От: Tom Lane
Дата:
FAQ