Skip to content

Commit 028b154

Browse files
committed
An addition to 8c441c0
Given that now SJE doesn't work with result relation, turn a code dealing with that into an assert that it shouldn't happen.
1 parent 8c441c0 commit 028b154

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/optimizer/plan/analyzejoins.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,8 +1900,10 @@ remove_self_join_rel(PlannerInfo *root, PlanRowMark *kmark, PlanRowMark *rmark,
19001900
/* Replace varno in all the query structures */
19011901
query_tree_walker(root->parse, replace_varno_walker, &ctx,
19021902
QTW_EXAMINE_SORTGROUP);
1903-
if (root->parse->resultRelation == toRemove->relid)
1904-
root->parse->resultRelation = toKeep->relid;
1903+
1904+
/* See remove_self_joins_one_group() */
1905+
Assert(root->parse->resultRelation != toRemove->relid);
1906+
Assert(root->parse->resultRelation != toKeep->relid);
19051907

19061908
/* Replace links in the planner info */
19071909
remove_rel_from_query(root, toRemove, toKeep->relid, NULL, NULL);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy