[COMMITTERS] pgsql: Bring plpgsql into line with header inclusion policy.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [COMMITTERS] pgsql: Bring plpgsql into line with header inclusion policy.
Дата
Msg-id E1cljxJ-0001vl-HV@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Bring plpgsql into line with header inclusion policy.

We have a project policy that every .c file should start by including
postgres.h, postgres_fe.h, or c.h as appropriate; and then there is no
need for any .h file to explicitly include any of these.  (The core
reason for this policy is to make it easy to verify that pg_config_os.h
is included before any system headers such as <stdio.h>; without that,
we have portability issues on some platforms due to variation in largefile
options across different modules in the backend.  Also, if .h files were
responsible for choosing which of these key headers to include, .h files
that need to be includable in either frontend or backend compiles would be
in trouble.)

plpgsql was blithely ignoring this policy, so whack it upside the head
until it complies.  I also chose to standardize on including plpgsql's
own .h files after all core-system headers that it pulls in.  That
could've been done either way, but this way seems saner.

Discussion: https://postgr.es/m/CAEepm=2zCoeq3QxVwhS5DFeUh=yU6z81pbWMgfOB8OzyiBwxzw@mail.gmail.com
Discussion: https://postgr.es/m/11634.1488932128@sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/08da52859a1fadeac10aab621c6c793791ec1f2c

Modified Files
--------------
src/pl/plpgsql/src/pl_comp.c    | 4 +++-
src/pl/plpgsql/src/pl_exec.c    | 4 +++-
src/pl/plpgsql/src/pl_funcs.c   | 4 +++-
src/pl/plpgsql/src/pl_gram.y    | 4 +++-
src/pl/plpgsql/src/pl_handler.c | 4 +++-
src/pl/plpgsql/src/pl_scanner.c | 4 +++-
src/pl/plpgsql/src/plpgsql.h    | 2 --
7 files changed, 18 insertions(+), 8 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Document intentional violations of header inclusion policy.
Следующее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Fix inclusions of postgres_fe.h from .h files.