BUG #19800: Wrong results: self-join elimination drops an ORDER BY sort key with GROUPING SETS / CUBE / ROLLUP

Log in to edit
ID 7774
Title BUG #19800: Wrong results: self-join elimination drops an ORDER BY sort key with GROUPING SETS / CUBE / ROLLUP
CI (CFBot) Summary
Stats (from CFBot) Patch version: v3, Patch count: 1, First patch: +477−5, All patches: +477−5
Tags Bugfix
Created 2026-12-02 07:58:02
Last modified 2026-12-02 07:58:02 (15 minutes ago)
Latest email 2026-11-12 21:34:49 (2 weeks ago)
Status
PG20-4 (2027-01-01 – 2027-01-31): Needs review
Target version
Authors Tender Wang (tndrwang), Narayanan Venkateswaran (narayananv)
Reviewers Log in to become reviewer
Committer
Links
Emails
BUG #19800: Wrong results: self-join elimination drops an ORDER BY sort key with GROUPING SETS / CUBE / ROLLUP
First at 2026-10-27 07:36:27 by PG Bug reporting form <noreply at postgresql.org>
Latest at 2026-11-12 21:34:49 by Narayanan Venkateswaran <narayananvpostgres at gmail.com>
Latest attachment (v3-0001-Skip-self-join-elimination-for-relations-in-group.patch) at 2026-11-12 21:34:49 from Narayanan Venkateswaran <narayananvpostgres at gmail.com>
    Attachment (v3-0001-Skip-self-join-elimination-for-relations-in-group.patch) at 2026-11-12 21:34:49 from Narayanan Venkateswaran <narayananvpostgres at gmail.com> (Patch: Pending check)
    Attachment (v2-0001-Skip-sje.patch) at 2026-11-11 06:38:06 from Tender Wang <tndrwang at gmail.com> (Patch: Pending check)
    Attachment (v1-0001-Skip-self-join-elimination-for-queries-with-grouping.patch) at 2026-10-29 06:41:05 from Narayanan Venkateswaran <narayananvpostgres at gmail.com> (Patch: Pending check)
History
When Who What
2026-12-02 07:58:02 Narayanan Venkateswaran (narayananv) Attached mail thread 19800-2f4fc7fcfb9a17a1@postgresql.org
2026-12-02 07:58:02 Narayanan Venkateswaran (narayananv) Created patch record
Log in to edit