Re: Move catalog toast table and index declarations - Mailing list pgsql-hackers

From John Naylor
Subject Re: Move catalog toast table and index declarations
Date
Msg-id CAFBsxsEdkVnuXeSGrGMU3MP=mHdF00AtJJrAwYD_oQW8TVRnQQ@mail.gmail.com
Whole thread Raw
In response to Re: Move catalog toast table and index declarations  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Move catalog toast table and index declarations
List pgsql-hackers

On Tue, Oct 27, 2020 at 7:43 AM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 2020-10-24 15:23, John Naylor wrote:
> Style: In genbki.h, "extern int no_such_variable" is now out of place.
> Also, the old comments like "The macro definitions are just to keep the
> C compiler from spitting up." are now redundant in their new setting.

Hmm, I don't really see what's wrong there.  Do you mean the macro
definitions should be different, or the comments are wrong, or something
else?

There's nothing wrong; it's just a minor point of consistency. For the first part, I mean defined symbols in this file that are invisible to the C compiler are written

#define SOMETHING()

If some are written

#define SOMETHING() extern int no_such_variable

I imagine some future reader will wonder why there's a difference.

As for the comments, the entire file is for things meant for scripts to read, but have to be put in macro form to be invisible to the compiler. The header comment has 

"genbki.h defines CATALOG(), BKI_BOOTSTRAP and related macros
 * so that the catalog header files can be read by the C compiler."

I'm just saying we don't need to carry over the comments I mentioned from the toasting/indexing headers that were specially for those macros.

--
John Naylor
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company 

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Online checksums verification in the backend
Next
From: Robert Haas
Date:
Subject: Re: parallel distinct union and aggregate support patch