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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 邱宇航 <iamqyh(at)gmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master
Date: 2025-09-23 14:39:02
Message-ID: 3084029.1758638342@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?utf-8?B?6YKx5a6H6Iiq?= <iamqyh(at)gmail(dot)com> writes:
> And what about the query 2. This is caused by another commit, and
> it's not mentioned in the commit message or the mailing discussion.

That one indeed seems quite broken. EXPLAIN confirms that it's
pushing the HAVING below the aggregation, which is simply wrong
because it fails to filter the all-null row(s) that the aggregation
node will create out of thin air.

Is there anything we can salvage from 67a54b9e, or should
we just revert it?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Todd Lang 2025-09-23 14:51:28 Supporting non-deterministic collations with tailoring rules.
Previous Message suyu.cmj 2025-09-23 14:38:14 Question about InvalidatePossiblyObsoleteSlot()