pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Japin Li <japinli@hotmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: turn fastgetattr and heap_getattr to inline functions
Date: Fri, 25 Mar 2022 10:42:14 +0100
Message-ID: <202203250942.4vbvvbtkf6fq@alvherre.pgsql> (raw)
In-Reply-To: <ME3P282MB1667663F3D30DBCFC984E85DB6199@ME3P282MB1667.AUSP282.PROD.OUTLOOK.COM>

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
don't have to build a theory for why the other function has a statement
that may or may not be actually doing anything.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)





view thread (11+ messages)  latest in thread

Message-ID: <202203250942.4vbvvbtkf6fq@alvherre.pgsql>
Permalink:  ../202203250942.4vbvvbtkf6fq@alvherre.pgsql/
Also on:    postgresql.org/message-id/202203250942.4vbvvbtkf6fq@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, japinli@hotmail.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: turn fastgetattr and heap_getattr to inline functions
  In-Reply-To: <202203250942.4vbvvbtkf6fq@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox