On Mon, May 24, 2021 at 2:23 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Mon, May 24, 2021 at 11:32:22AM +0530, Dilip Kumar wrote:
> > I think you don't need to initialize tup_values[i] with the
> > values[i];, other than that looks fine to me.
>
> You mean because heap_deform_tuple() does this job, right? Sure.
Sorry, I just noticed that my statement was incomplete in last mail,
what I wanted to say is that if the attisdropped then we can avoid
"tup_values[i] = values[i]", so in short we can move "tup_values[i] =
values[i]" in the else part of " if (TupleDescAttr(newTupDesc,
i)->attisdropped)" check.
Like this.
if (TupleDescAttr(newTupDesc, i)->attisdropped)
isnull[i] = true;
else
tup_values[i] = values[i];
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com