Re: turn fastgetattr and heap_getattr to inline functions

From: Japin Li <japinli(at)hotmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: turn fastgetattr and heap_getattr to inline functions
Date: 2022-03-25 11:18:14
Message-ID: MEYP282MB166906F3D37991C5B6095AC7B61A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Fri, 25 Mar 2022 at 17:42, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> On 2022-Mar-24, Japin Li wrote:
>
>> Thanks for your detail explaination. I find bottomup_sort_and_shrink_cmp()
>> has smilar code
>
> ... except that bottomup_sort_and_shrink_cmp never handles the case of
> the two structs being exactly identical, so I don't think this is a
> great counter-example.
>
>> IIUC, the last statement is used to keep the compiler quiet. However,
>> it doesn't exist in LWLockAttemptLock(). Why?
>
> What I do care about is the fact that LWLockAttemptLock does compile
> silently everywhere without a final "return dummy_value" statement.

I'm just a bit confused about this.

> I
> don't have to build a theory for why the other function has a statement
> that may or may not be actually doing anything.

Anyway, thanks for your explaination!

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-03-25 11:18:31 Re: Allow file inclusion in pg_hba and pg_ident files
Previous Message Pavel Borisov 2022-03-25 10:49:08 Re: Fix unsigned output for signed values in SLRU error reporting