Re: Move catalog toast table and index declarations

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: Move catalog toast table and index declarations
Дата
Msg-id CAFBsxsEdkVnuXeSGrGMU3MP=mHdF00AtJJrAwYD_oQW8TVRnQQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Move catalog toast table and index declarations  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: Move catalog toast table and index declarations  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Online checksums verification in the backend
Следующее
От: Robert Haas
Дата:
Сообщение: Re: parallel distinct union and aggregate support patch