Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master
Date
Msg-id 3231170.1758676988@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master
List 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 by date:

Previous
From: Alexandra Wang
Date:
Subject: Re: SQL:2023 JSON simplified accessor support
Next
From: Keisuke Kuroda
Date:
Subject: Re: Add support for entry counting in pgstats