Feb 2026

1 commit
Fix unsafe RTE_GROUP removal in simplify_EXISTS_query
25 Feb 2026Richard Guomaster19beta1REL_19_STABLE19beta1REL_18_STABLE18.4
LLM analysis, 100% surelanded as postedfrom patchset #411 of 1 reviewer saw the final version

The commit and #41 have identical stable git patch IDs; both convert RTE_GROUP to RTE_RESULT, clear groupexprs, and preserve range-table indexes in src/backend/optimizer/plan/subselect.c.

  • Tom Lanesaw the final versiontrailerTom identified the unsafe deletion in #40, investigated possible counterexamples, and explicitly approved #41 in #42.

Oct 2024

1 commit
Remove the RTE_GROUP RTE if we drop the groupClause
25 Oct 2024Richard Guomaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #380 of 1 reviewer saw the final version

The commit retains the RTE_GROUP deletion and join regression test from #38, but moves clearing hasGroupRTE inside the matching-RTE branch in src/backend/optimizer/plan/subselect.c and adjusts its comment.

  • David Rowleysaw an earlier versionLLM analysis, 88% sureDavid supplied the crashing EXISTS/GROUP BY reproducer for the landed RTE_GROUP patch in #36, directly prompting this fix, but did not review the subsequent attachment #38.

Sep 2024

2 commits
Mark expressions nullable by grouping sets
10 Sep 2024Richard Guomaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #330 of 2 reviewers saw the final version

The commit takes the second patch of the three-patch submission #33, with matching nullability logic and regression changes plus a src/include/catalog/catversion.h bump; it excludes the proposed PlaceHolderVar-unwrapping patch.

  • Ashutosh Bapatsaw an earlier versiontrailerAshutosh questioned the RTE_GROUP checks in get_eclass_for_sort_expr and mark_rels_nulled_by_join in #16, before the additional conditional nullability handling in #22.
  • Sutou Kouheino review foundtrailerSutou's review in #24 explicitly addresses the first parser-infrastructure patch, with no demonstrated review of the separate nullability patch.
Introduce an RTE for the grouping step
10 Sep 2024Richard Guomaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #330 of 2 reviewers saw the final version

The commit takes the first patch from #33, preserving its implementation while adding a catalog-version bump and regression tests for the boolean HAVING cases described in that message.

  • Ashutosh Bapatsaw an earlier versiontrailerAshutosh reviewed the architecture and implementation in #16 and tested subquery evaluation in #26, before the HAVING preprocessing correction in #33.
  • Sutou Kouheisaw an earlier versiontrailerSutou reviewed comments, context naming, and unnamed grouping columns in #24, before the later HAVING preprocessing correction in #33.

Credits across 4 commits

Author
Richard Guo4
Reviewer
Ashutosh Bapat2
Sutou Kouhei2
Tom Lane1
Reported by
David Rowley1
Tom Lane1
Committer
Richard Guo4