| From: | 飞鱼 <303677365(at)qq(dot)com> |
|---|---|
| To: | Tender Wang <tndrwang(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: BUG #19805: Wrong results: self-join elimination drops an ORDER BY sort key with GROUPING SETS / CUBE / ROLLUP |
| Date: | 2026-10-30 07:54:36 |
| Message-ID: | tencent_75244E0B591C8F4C9D2485A4F456A2611E0A@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi Tender,
Sorry, This is a duplicate of BUG #19800, please follow up there.
Thanks,
Chunling
原始邮件
发件人:Tender Wang <tndrwang(at)gmail(dot)com>
发件时间:2026年10月30日 15:27
收件人:303677365 <303677365(at)qq(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
主题:Re: BUG #19805: Wrong results: self-join elimination drops an ORDER BY sort key with GROUPING SETS / CUBE / ROLLUP
PG Bug reporting form <noreply(at)postgresql(dot)org> 于2026年10月30日周五 15:11写道:
>
> The following bug has been logged on the website:
> SET enable_self_join_elimination = on; -- default
> SELECT s1.a, s2.a FROM m2 s1 JOIN m2 s2 ON s1.a = s2.a
> GROUP BY CUBE (s1.a, s2.a) ORDER BY 1, 2;
>
> SET enable_self_join_elimination = off;
> SELECT s1.a, s2.a FROM m2 s1 JOIN m2 s2 ON s1.a = s2.a
> GROUP BY CUBE (s1.a, s2.a) ORDER BY 1, 2;
> SQL
>
> Actual output (N = NULL):
>
> SJE on : (1,N) (1,1) (2,2) (2,N) (N,N) (N,1) (N,2)
> SJE off: (1,1) (1,N) (2,2) (2,N) (N,1) (N,2) (N,N)
Hi,
This appears to be the same SJE/GROUPING SETS issue already reported
in BUG #19800 [1]
Could you check whether your test case exposes a different underlying issue?
If so, please explain how it differs in this thread. Otherwise, please
keep additional test cases in the existing thread.
For future reports, please check for existing reports of the same
issue before opening a new thread.
[1] https://www.postgresql.org/message-id/19800-2f4fc7fcfb9a17a1%40postgresql.org
--
Thanks,
Tender Wang
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tender Wang | 2026-10-30 08:08:30 | Re: BUG #19804: "variable not found in subplan target list", DISTINCT agg over Gather` |
| Previous Message | Tender Wang | 2026-10-30 07:27:36 | Re: BUG #19805: Wrong results: self-join elimination drops an ORDER BY sort key with GROUPING SETS / CUBE / ROLLUP |