1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-15 05:46:52 +03:00

Do a tiny bit of header file maintenance

Stop including utils/relcache.h in access/genam.h, and stop including
htup_details.h in nodes/tidbitmap.h.  Both these files (genam.h and
tidbitmap.h) are widely used in other header files, so it's in our best
interest that they remain as lean as reasonable.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/202509291356.o5t6ny2hoa3q@alvherre.pgsql
This commit is contained in:
Álvaro Herrera
2025-09-30 12:28:29 +02:00
parent bb68cde413
commit 3bf31dd243
7 changed files with 9 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
#include "utils/fmgrprotos.h" #include "utils/fmgrprotos.h"
#include "utils/sortsupport.h" #include "utils/sortsupport.h"
#include "utils/varbit.h" #include "utils/varbit.h"
#include "varatt.h"
/* GiST support functions */ /* GiST support functions */
PG_FUNCTION_INFO_V1(gbt_bit_compress); PG_FUNCTION_INFO_V1(gbt_bit_compress);

View File

@@ -40,6 +40,7 @@
#include <limits.h> #include <limits.h>
#include "access/htup_details.h"
#include "common/hashfn.h" #include "common/hashfn.h"
#include "common/int.h" #include "common/int.h"
#include "nodes/bitmapset.h" #include "nodes/bitmapset.h"

View File

@@ -37,6 +37,7 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "utils/fmgrprotos.h" #include "utils/fmgrprotos.h"
#include "utils/inet.h" #include "utils/inet.h"
#include "varatt.h"
static int inet_spg_node_number(const inet *val, int commonbits); static int inet_spg_node_number(const inet *val, int commonbits);

View File

@@ -15,6 +15,8 @@
#include "access/cmptype.h" #include "access/cmptype.h"
#include "access/genam.h" #include "access/genam.h"
#include "access/stratnum.h" #include "access/stratnum.h"
#include "nodes/nodes.h"
#include "nodes/pg_list.h"
/* /*
* We don't wish to include planner header files here, since most of an index * We don't wish to include planner header files here, since most of an index

View File

@@ -20,13 +20,15 @@
#include "nodes/tidbitmap.h" #include "nodes/tidbitmap.h"
#include "storage/buf.h" #include "storage/buf.h"
#include "storage/lockdefs.h" #include "storage/lockdefs.h"
#include "utils/relcache.h"
#include "utils/snapshot.h" #include "utils/snapshot.h"
/* We don't want this file to depend on execnodes.h. */ /* We don't want this file to depend on execnodes.h. */
typedef struct IndexInfo IndexInfo; typedef struct IndexInfo IndexInfo;
typedef struct TupleTableSlot TupleTableSlot; typedef struct TupleTableSlot TupleTableSlot;
/* or relcache.h */
typedef struct RelationData *Relation;
/* /*
* Struct for statistics maintained by amgettuple and amgetbitmap * Struct for statistics maintained by amgettuple and amgetbitmap

View File

@@ -22,6 +22,7 @@
#include "catalog/pg_index.h" #include "catalog/pg_index.h"
#include "lib/stringinfo.h" #include "lib/stringinfo.h"
#include "storage/bufmgr.h" #include "storage/bufmgr.h"
#include "storage/dsm.h"
#include "storage/shm_toc.h" #include "storage/shm_toc.h"
#include "utils/skipsupport.h" #include "utils/skipsupport.h"

View File

@@ -22,7 +22,6 @@
#ifndef TIDBITMAP_H #ifndef TIDBITMAP_H
#define TIDBITMAP_H #define TIDBITMAP_H
#include "access/htup_details.h"
#include "storage/itemptr.h" #include "storage/itemptr.h"
#include "utils/dsa.h" #include "utils/dsa.h"