Em ter., 20 de fev. de 2024 às 00:18, Andrei Lepikhov <
a.lepik...@postgrespro.ru> escreveu:

> On 19/2/2024 19:53, Ranier Vilela wrote:
> > v17-0002
> > 1) move the vars *arrayconst and *dest, to after if, to avoid makeNode
> > (palloc).
> > + Const   *arrayconst;
> > + ScalarArrayOpExpr  *dest;
> > +
> > + pd = (PredicatesData *) lfirst(lc);
> > + if (pd->elems == NIL)
> > + /* The index doesn't participate in this operation */
> > + continue;
> >
> > + arrayconst = lsecond_node(Const, saop->args);
> > + dest = makeNode(ScalarArrayOpExpr);
> Thanks for the review!
> I'm not sure I understand you clearly. Does the patch in attachment fix
> the issue you raised?
>
Sorry if I wasn't clear.
What I meant is to move the initializations of the variables *arrayconst*
and *dest*
for after the test (if (pd->elems == NIL)
To avoid unnecessary initialization if the test fails.

best regards,
Ranier Vilela

Reply via email to