Re: How to include the header files effectively

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: How to include the header files effectively
Дата
Msg-id 20190412043110.GK2144@paquier.xyz
обсуждение исходный текст
Ответ на Re: How to include the header files effectively  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Apr 11, 2019 at 10:22:56PM -0400, Alvaro Herrera wrote:
> What are you trying to do?  Your .c file must include "postgres.h"
> before any other header file.  There should be no other dependencies.

The usual rule when it comes to develop extensions or a patch is to
include headers in the following order:
1) postgres.h for backend code and postgres_fe.h for frontend (use
ifdef FRONTEND if a file is used in both context, see src/common/*.c).
2) System-related headers, like <unistd.h> or such.
3) Other PostgreSQL internal headers, in any patch posted to the lists
these in alphabetical order is warmly welcome.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Attempt to consolidate reading of XLOG page
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Adding Unix domain socket path and port topg_stat_get_wal_senders()