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-12 02:10:49
Message-ID: CAGRkXqQY+ASKoudye9c8hO5EYuXUJQp77HjSZMykz5eVkk_20A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Haibo,

I reviewed v1 and it looks correct to me.

Both of your queries give the right rows on master and 19, and the
new tests fail without the fix. I asked Claude to try about 80 more
queries, in HAVING, ORDER BY, window functions, sublinks and LATERAL.
All give the rows I expect.

The code applies to 18 too, only two hunks of expected output differ.

The file sent as v2 is not the same patch though. It does not apply
to master, its test hunks need a gs_users test that is not in the
tree. The code is different, the NOT NULL test is gone, and it has no
Reported-by line. Was it the wrong file?

The first query is right on 18 and wrong on 19, so I hope this can go
in before 19 is out.

Thanks,
Shihao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message lin teletele 2026-10-12 02:14:18 Re: [PATCH] Fix pg_dump --clean with inherited partition constraints
Previous Message wenhui qiu 2026-10-12 01:56:56 Re: Wrong results from an antijoin