@@ -118,7 +118,7 @@ ExprState *
118118ExecInitExpr (Expr * node , PlanState * parent )
119119{
120120 ExprState * state ;
121- ExprEvalStep scratch ;
121+ ExprEvalStep scratch = { 0 } ;
122122
123123 /* Special case: NULL expression produces a NULL ExprState pointer */
124124 if (node == NULL )
@@ -155,7 +155,7 @@ ExprState *
155155ExecInitExprWithParams (Expr * node , ParamListInfo ext_params )
156156{
157157 ExprState * state ;
158- ExprEvalStep scratch ;
158+ ExprEvalStep scratch = { 0 } ;
159159
160160 /* Special case: NULL expression produces a NULL ExprState pointer */
161161 if (node == NULL )
@@ -204,7 +204,7 @@ ExprState *
204204ExecInitQual (List * qual , PlanState * parent )
205205{
206206 ExprState * state ;
207- ExprEvalStep scratch ;
207+ ExprEvalStep scratch = { 0 } ;
208208 List * adjust_jumps = NIL ;
209209 ListCell * lc ;
210210
@@ -353,7 +353,7 @@ ExecBuildProjectionInfo(List *targetList,
353353{
354354 ProjectionInfo * projInfo = makeNode (ProjectionInfo );
355355 ExprState * state ;
356- ExprEvalStep scratch ;
356+ ExprEvalStep scratch = { 0 } ;
357357 ListCell * lc ;
358358
359359 projInfo -> pi_exprContext = econtext ;
@@ -638,7 +638,7 @@ static void
638638ExecInitExprRec (Expr * node , ExprState * state ,
639639 Datum * resv , bool * resnull )
640640{
641- ExprEvalStep scratch ;
641+ ExprEvalStep scratch = { 0 } ;
642642
643643 /* Guard against stack overflow due to overly complex expressions */
644644 check_stack_depth ();
@@ -2273,7 +2273,10 @@ ExecInitExprSlots(ExprState *state, Node *node)
22732273static void
22742274ExecPushExprSlots (ExprState * state , LastAttnumInfo * info )
22752275{
2276- ExprEvalStep scratch ;
2276+ ExprEvalStep scratch = {0 };
2277+
2278+ scratch .resvalue = NULL ;
2279+ scratch .resnull = NULL ;
22772280
22782281 /* Emit steps as needed */
22792282 if (info -> last_inner > 0 )
@@ -2659,7 +2662,7 @@ static void
26592662ExecInitCoerceToDomain (ExprEvalStep * scratch , CoerceToDomain * ctest ,
26602663 ExprState * state , Datum * resv , bool * resnull )
26612664{
2662- ExprEvalStep scratch2 ;
2665+ ExprEvalStep scratch2 = { 0 } ;
26632666 DomainConstraintRef * constraint_ref ;
26642667 Datum * domainval = NULL ;
26652668 bool * domainnull = NULL ;
@@ -2811,7 +2814,7 @@ ExecBuildAggTrans(AggState *aggstate, AggStatePerPhase phase,
28112814{
28122815 ExprState * state = makeNode (ExprState );
28132816 PlanState * parent = & aggstate -> ss .ps ;
2814- ExprEvalStep scratch ;
2817+ ExprEvalStep scratch = { 0 } ;
28152818 int transno = 0 ;
28162819 int setoff = 0 ;
28172820 bool isCombine = DO_AGGSPLIT_COMBINE (aggstate -> aggsplit );
0 commit comments