Re: Move pg_attribute.attcompression to earlier in struct for reduced size? - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Date
Msg-id CAFiTN-vpHrCzdeyKxpoPViyJCZZx-h8KghQJFyxZd7+Dys6Cow@mail.gmail.com
Whole thread Raw
In response to Re: Move pg_attribute.attcompression to earlier in struct for reduced size?  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Force disable of SSL renegociation in the server
Next
From: Magnus Hagander
Date:
Subject: Re: Commitfest app vs. pgsql-docs