Re: [PATCH] Fix grouping-set nulling of variable-free grouping expressions

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Haibo Yan <tristan(dot)yim(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: [PATCH] Fix grouping-set nulling of variable-free grouping expressions
Date: 2026-10-17 03:23:05
Message-ID: CAGRkXqSrWujfEHHjKWGj+J3De7y1-5FNaJLQsntYeF5gX75XYA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Haibo,

Thanks for your v3. I think it breaks some thing that is right today.

On master with v3:

SELECT 1 AS one, 1 AS uno GROUP BY ROLLUP(one);

gives uno = NULL in the grand-total row. Master, 17 and 18 give 1.

The parser turns the second 1 into the group Var, and with the shared
phid it now gets nulled. Andrey Rachitskiy's patch for bug 19752 stops
that [1].

With his patch, v3 is supposed to be ok. So that created some dependency
on submission.

[1]
https://www.postgresql.org/message-id/CAB8bMiv2JLSxs1aYF42G4887y5LdY=1-E8FLj_wGmKFooqWocQ@mail.gmail.com
Thanks,
Shihao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-10-17 03:32:24 Re: [PG19] Indexes from 18 miss rows after pg_upgrade
Previous Message Noah Misch 2026-10-17 03:22:15 Add Dockerfile for OSS Scanner