@@ -118,7 +118,7 @@ ExprState *
118
118
ExecInitExpr (Expr * node , PlanState * parent )
119
119
{
120
120
ExprState * state ;
121
- ExprEvalStep scratch ;
121
+ ExprEvalStep scratch = { 0 } ;
122
122
123
123
/* Special case: NULL expression produces a NULL ExprState pointer */
124
124
if (node == NULL )
@@ -155,7 +155,7 @@ ExprState *
155
155
ExecInitExprWithParams (Expr * node , ParamListInfo ext_params )
156
156
{
157
157
ExprState * state ;
158
- ExprEvalStep scratch ;
158
+ ExprEvalStep scratch = { 0 } ;
159
159
160
160
/* Special case: NULL expression produces a NULL ExprState pointer */
161
161
if (node == NULL )
@@ -204,7 +204,7 @@ ExprState *
204
204
ExecInitQual (List * qual , PlanState * parent )
205
205
{
206
206
ExprState * state ;
207
- ExprEvalStep scratch ;
207
+ ExprEvalStep scratch = { 0 } ;
208
208
List * adjust_jumps = NIL ;
209
209
ListCell * lc ;
210
210
@@ -353,7 +353,7 @@ ExecBuildProjectionInfo(List *targetList,
353
353
{
354
354
ProjectionInfo * projInfo = makeNode (ProjectionInfo );
355
355
ExprState * state ;
356
- ExprEvalStep scratch ;
356
+ ExprEvalStep scratch = { 0 } ;
357
357
ListCell * lc ;
358
358
359
359
projInfo -> pi_exprContext = econtext ;
@@ -638,7 +638,7 @@ static void
638
638
ExecInitExprRec (Expr * node , ExprState * state ,
639
639
Datum * resv , bool * resnull )
640
640
{
641
- ExprEvalStep scratch ;
641
+ ExprEvalStep scratch = { 0 } ;
642
642
643
643
/* Guard against stack overflow due to overly complex expressions */
644
644
check_stack_depth ();
@@ -2273,7 +2273,10 @@ ExecInitExprSlots(ExprState *state, Node *node)
2273
2273
static void
2274
2274
ExecPushExprSlots (ExprState * state , LastAttnumInfo * info )
2275
2275
{
2276
- ExprEvalStep scratch ;
2276
+ ExprEvalStep scratch = {0 };
2277
+
2278
+ scratch .resvalue = NULL ;
2279
+ scratch .resnull = NULL ;
2277
2280
2278
2281
/* Emit steps as needed */
2279
2282
if (info -> last_inner > 0 )
@@ -2659,7 +2662,7 @@ static void
2659
2662
ExecInitCoerceToDomain (ExprEvalStep * scratch , CoerceToDomain * ctest ,
2660
2663
ExprState * state , Datum * resv , bool * resnull )
2661
2664
{
2662
- ExprEvalStep scratch2 ;
2665
+ ExprEvalStep scratch2 = { 0 } ;
2663
2666
DomainConstraintRef * constraint_ref ;
2664
2667
Datum * domainval = NULL ;
2665
2668
bool * domainnull = NULL ;
@@ -2811,7 +2814,7 @@ ExecBuildAggTrans(AggState *aggstate, AggStatePerPhase phase,
2811
2814
{
2812
2815
ExprState * state = makeNode (ExprState );
2813
2816
PlanState * parent = & aggstate -> ss .ps ;
2814
- ExprEvalStep scratch ;
2817
+ ExprEvalStep scratch = { 0 } ;
2815
2818
int transno = 0 ;
2816
2819
int setoff = 0 ;
2817
2820
bool isCombine = DO_AGGSPLIT_COMBINE (aggstate -> aggsplit );
0 commit comments