From 7487044d6ccf183e53d2633024595779922dbee2 Mon Sep 17 00:00:00 2001 From: David Rowley Date: Wed, 3 Apr 2024 15:39:29 +1300 Subject: [PATCH] Don't adjust ressortgroupref in generate_setop_child_grouplist() This is already done inside assignSortGroupRef(), therefore is redundant. Oversight from 66c0185a3. Reported-by: Tom Lane Discussion: https://postgr.es/m/3703023.1711654574@sss.pgh.pa.us --- src/backend/optimizer/plan/planner.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index d4c13a518f..5320da51a0 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -7959,7 +7959,6 @@ generate_setop_child_grouplist(SetOperationStmt *op, List *targetlist) /* assign a tleSortGroupRef, or reuse the existing one */ sgc->tleSortGroupRef = assignSortGroupRef(tle, targetlist); - tle->ressortgroupref = sgc->tleSortGroupRef; } Assert(lg == NULL); return grouplist;