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

Commit5424f4d

Browse files
committed
Don't call simplify_aggref with a NULL PlannerInfo
42473b3 added prosupport infrastructure to allow simplification ofAggrefs during constant-folding. In some cases the context->root that'sgiven to eval_const_expressions_mutator() can be NULL.42473b3 failedto take that into account, which could result in a crash.To fix, add a check and only call simplify_aggref() when the PlannerInfois set.Author: David Rowley <dgrowleyml@gmail.com>Reported-by: Birler, Altan <altan.birler@tum.de>Discussion:https://postgr.es/m/132d4da23b844d5ab9e352d34096eab5@tum.de
1 parentc902bd5 commit5424f4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/optimizer/util/clauses.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2638,7 +2638,9 @@ eval_const_expressions_mutator(Node *node,
26382638
}
26392639
caseT_Aggref:
26402640
node=ece_generic_processing(node);
2641-
returnsimplify_aggref((Aggref*)node,context);
2641+
if (context->root!=NULL)
2642+
returnsimplify_aggref((Aggref*)node,context);
2643+
returnnode;
26422644
caseT_OpExpr:
26432645
{
26442646
OpExpr*expr= (OpExpr*)node;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp