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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, 邱宇航 <iamqyh(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-10-17 16:40:41
Message-ID: 1709818.1760719241@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I started to look at this again, and now I'm thinking that there is
> indeed an issue related to "Query 1".

Oh, scratch that, I see my mistake: I was thinking of "1" as a
constant, but actually we must be interpreting it per SQL92 rules
as a reference to output column 1. So that's why adding or dropping
the "id" output column changes the results of the grouping.

-ENOCAFFEINE ... sorry for the noise. I'll go back to studying
the HAVING issue.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-10-17 16:53:45 Re: Getting the SQLSTATE after a failed connection
Previous Message Jacob Champion 2025-10-17 16:39:24 Re: Question for coverage report