Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc3f52fd

Browse files
committed
Handle WindowClause.runCondition in tree walker/mutator functions.
Commit9d9c02c, which added the notion of a "run condition" forwindow functions, neglected to teach nodeFuncs.c to process the newfield. Remarkably, that doesn't seem to have had any ill effectsbefore we invented Var.varnullingrels, but now it can cause visiblefailures in join-removal scenarios.I have no faith that there's not reachable problems in v15 too,so back-patch the code change to v15 where9d9c02c came in.The test case seems irrelevant to v15, though.Per bug #18277 from Zuming Jiang. Diagnosis and patch byRichard Guo.Discussion:https://postgr.es/m/18277-089ead83b329a2fd@postgresql.org
1 parentc74aad0 commitc3f52fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/nodes/nodeFuncs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,6 +2180,8 @@ expression_tree_walker(Node *node,
21802180
return true;
21812181
if (walker(wc->endOffset,context))
21822182
return true;
2183+
if (walker(wc->runCondition,context))
2184+
return true;
21832185
}
21842186
break;
21852187
caseT_CTECycleClause:
@@ -2457,6 +2459,8 @@ query_tree_walker(Query *query,
24572459
return true;
24582460
if (walker(wc->endOffset,context))
24592461
return true;
2462+
if (walker(wc->runCondition,context))
2463+
return true;
24602464
}
24612465
}
24622466

@@ -3094,6 +3098,7 @@ expression_tree_mutator(Node *node,
30943098
MUTATE(newnode->orderClause,wc->orderClause,List*);
30953099
MUTATE(newnode->startOffset,wc->startOffset,Node*);
30963100
MUTATE(newnode->endOffset,wc->endOffset,Node*);
3101+
MUTATE(newnode->runCondition,wc->runCondition,List*);
30973102
return (Node*)newnode;
30983103
}
30993104
break;
@@ -3423,6 +3428,7 @@ query_tree_mutator(Query *query,
34233428
FLATCOPY(newnode,wc,WindowClause);
34243429
MUTATE(newnode->startOffset,wc->startOffset,Node*);
34253430
MUTATE(newnode->endOffset,wc->endOffset,Node*);
3431+
MUTATE(newnode->runCondition,wc->runCondition,List*);
34263432

34273433
resultlist=lappend(resultlist, (Node*)newnode);
34283434
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp