Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master
Дата
Msg-id 3231170.1758676988@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master
Список pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> As for fixing it; testing for a Const-false havingClause can't be done
> as that only works for this case which const-folding happens to figure
> out during planning. You could equally have something Var-less like:

Yeah, I don't think the havingClause being constant-false is the
key point here.  I've not looked closely at 67a54b9e, but I suspect
that anything Var-free is potentially an issue.  Or it might even
fail for something that has Vars but is non-strict.

The core of the problem though is that the aggregation node will
issue an all-nulls row that did not come from its input, and we
have to be sure that the HAVING clause is properly evaluated
for that row.

            regards, tom lane



В списке pgsql-hackers по дате отправления: