Skip to content

Commit 49bff41

Browse files
committed
Remove some inappropriate #includes.
Other header files should never #include postgres.h (nor postgres_fe.h, nor c.h), per project policy. Also, there's no need for any backend .c file to explicitly include elog.h or palloc.h, because postgres.h pulls those in already. Extracted from a larger patch by Kyotaro Horiguchi. The rest of the removals he suggests require more study, but these are no-brainers. Discussion: https://postgr.es/m/20180215.200447.209320006.horiguchi.kyotaro@lab.ntt.co.jp
1 parent 2fb1aba commit 49bff41

File tree

7 files changed

+0
-7
lines changed

7 files changed

+0
-7
lines changed

src/backend/lib/knapsack.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "nodes/bitmapset.h"
3333
#include "utils/builtins.h"
3434
#include "utils/memutils.h"
35-
#include "utils/palloc.h"
3635

3736
/*
3837
* DiscreteKnapsack

src/backend/replication/basebackup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include "storage/fd.h"
3535
#include "storage/ipc.h"
3636
#include "utils/builtins.h"
37-
#include "utils/elog.h"
3837
#include "utils/ps_status.h"
3938
#include "utils/relcache.h"
4039
#include "utils/timestamp.h"

src/backend/utils/misc/pg_config.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "catalog/pg_type.h"
2020
#include "common/config_info.h"
2121
#include "utils/builtins.h"
22-
#include "utils/elog.h"
2322
#include "port.h"
2423

2524
Datum

src/backend/utils/misc/rls.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "miscadmin.h"
2323
#include "utils/acl.h"
2424
#include "utils/builtins.h"
25-
#include "utils/elog.h"
2625
#include "utils/lsyscache.h"
2726
#include "utils/rls.h"
2827
#include "utils/syscache.h"

src/include/lib/knapsack.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#ifndef KNAPSACK_H
99
#define KNAPSACK_H
1010

11-
#include "postgres.h"
1211
#include "nodes/bitmapset.h"
1312

1413
extern Bitmapset *DiscreteKnapsack(int max_weight, int num_items,

src/pl/plpython/plpy_spi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#ifndef PLPY_SPI_H
66
#define PLPY_SPI_H
77

8-
#include "utils/palloc.h"
98
#include "utils/resowner.h"
109

1110
extern PyObject *PLy_spi_prepare(PyObject *self, PyObject *args);

src/pl/plpython/plpy_util.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include "mb/pg_wchar.h"
1010
#include "utils/memutils.h"
11-
#include "utils/palloc.h"
1211

1312
#include "plpython.h"
1413

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy