Re: Add missing includes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add missing includes
Дата
Msg-id 629024.1684769299@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add missing includes  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Add missing includes  ("Tristan Partin" <tristan@neon.tech>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2023-May-22, Tristan Partin wrote:
>> Some files were missing information from the c.h header.

> Actually, these omissions are intentional, and we have bespoke handling
> for this in our own header-checking scripts (src/tools/pginclude).  I
> imagine this is documented somewhere, but ATM I can't remember where.
> (And if not, maybe that's something we should do.)

Yeah, the general policy is that .h files should not explicitly include
c.h (nor postgres.h nor postgres_fe.h).  Instead, .c files should include
the appropriate one of those three files first.  This allows sharing of
.h files more easily across frontend/backend/common environments.

I'm not sure where this is documented either.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Tristan Partin"
Дата:
Сообщение: Re: Add missing includes
Следующее
От: "Tristan Partin"
Дата:
Сообщение: Re: Add missing includes