Re: removing unnecessary get_att*() lsyscache functions - Mailing list pgsql-hackers

From Andres Freund
Subject Re: removing unnecessary get_att*() lsyscache functions
Date
Msg-id 20181023001944.g6jpgnitb7yemmiv@alap3.anarazel.de
Whole thread Raw
In response to Re: removing unnecessary get_att*() lsyscache functions  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

On 2018-10-23 09:11:17 +0900, Michael Paquier wrote:
> On Mon, Oct 22, 2018 at 07:12:28PM +0200, Peter Eisentraut wrote:
> > OK, slightly reworked version attached.
> 
> +   attTup = (Form_pg_attribute) GETSTRUCT(tuple);
>     attnum = ((Form_pg_attribute) GETSTRUCT(tuple))->attnum;
> 
> No need to call twice GETSTRUCT here..  The rest looks fine.

Just about every optimize compiler can optimize that away, it's just a
bit of pointer magic.  Obviously we don't want to repeat longer lines
superfluously, but twice isn't that bad...

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: removing unnecessary get_att*() lsyscache functions
Next
From: Amit Langote
Date:
Subject: Re: relhassubclass and partitioned indexes