Skip to content

Commit a3540b0

Browse files
committed
Improve our #include situation by moving pointer types away from the
corresponding struct definitions. This allows other headers to avoid including certain highly-loaded headers such as rel.h and relscan.h, instead using just relcache.h, heapam.h or genam.h, which are more lightweight and thus cause less unnecessary dependencies.
1 parent d1da215 commit a3540b0

File tree

113 files changed

+292
-205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+292
-205
lines changed

contrib/btree_gist/btree_numeric.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/btree_gist/btree_numeric.c,v 1.11 2008/05/17 01:28:19 adunstan Exp $
2+
* $PostgreSQL: pgsql/contrib/btree_gist/btree_numeric.c,v 1.12 2008/06/19 00:46:02 alvherre Exp $
33
*/
44
#include "btree_gist.h"
55

@@ -9,6 +9,7 @@
99
#include "btree_utils_var.h"
1010
#include "utils/builtins.h"
1111
#include "utils/numeric.h"
12+
#include "utils/rel.h"
1213

1314
/*
1415
** Bytea ops

contrib/btree_gist/btree_utils_num.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/btree_gist/btree_utils_num.h,v 1.12 2008/05/17 01:28:19 adunstan Exp $
2+
* $PostgreSQL: pgsql/contrib/btree_gist/btree_utils_num.h,v 1.13 2008/06/19 00:46:02 alvherre Exp $
33
*/
44
#ifndef __BTREE_UTILS_NUM_H__
55
#define __BTREE_UTILS_NUM_H__
66

77
#include "btree_gist.h"
8+
#include "utils/rel.h"
89

910
#include <math.h>
1011
#include <float.h>

contrib/btree_gist/btree_utils_var.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/btree_gist/btree_utils_var.c,v 1.19 2008/05/17 01:28:19 adunstan Exp $
2+
* $PostgreSQL: pgsql/contrib/btree_gist/btree_utils_var.c,v 1.20 2008/06/19 00:46:02 alvherre Exp $
33
*/
44
#include "btree_gist.h"
55

@@ -10,6 +10,7 @@
1010
#include "btree_utils_var.h"
1111
#include "utils/pg_locale.h"
1212
#include "utils/builtins.h"
13+
#include "utils/rel.h"
1314

1415
PG_FUNCTION_INFO_V1(gbt_var_decompress);
1516
Datum gbt_var_decompress(PG_FUNCTION_ARGS);

contrib/pgrowlocks/pgrowlocks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgrowlocks/pgrowlocks.c,v 1.10 2008/05/12 00:00:43 alvherre Exp $
2+
* $PostgreSQL: pgsql/contrib/pgrowlocks/pgrowlocks.c,v 1.11 2008/06/19 00:46:03 alvherre Exp $
33
*
44
* Copyright (c) 2005-2006 Tatsuo Ishii
55
*
@@ -26,6 +26,7 @@
2626

2727
#include "access/heapam.h"
2828
#include "access/multixact.h"
29+
#include "access/relscan.h"
2930
#include "access/xact.h"
3031
#include "catalog/namespace.h"
3132
#include "funcapi.h"

contrib/pgstattuple/pgstattuple.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.35 2008/05/16 17:31:17 tgl Exp $
2+
* $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.36 2008/06/19 00:46:03 alvherre Exp $
33
*
44
* Copyright (c) 2001,2002 Tatsuo Ishii
55
*
@@ -26,9 +26,8 @@
2626

2727
#include "access/gist_private.h"
2828
#include "access/hash.h"
29-
#include "access/heapam.h"
30-
#include "access/htup.h"
3129
#include "access/nbtree.h"
30+
#include "access/relscan.h"
3231
#include "catalog/namespace.h"
3332
#include "funcapi.h"
3433
#include "miscadmin.h"

src/backend/access/gin/ginbtree.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gin/ginbtree.c,v 1.12 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gin/ginbtree.c,v 1.13 2008/06/19 00:46:03 alvherre Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414

@@ -17,6 +17,7 @@
1717
#include "access/gin.h"
1818
#include "miscadmin.h"
1919
#include "storage/bufmgr.h"
20+
#include "utils/rel.h"
2021

2122
/*
2223
* Locks buffer by needed method for search.

src/backend/access/gin/gindatapage.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gin/gindatapage.c,v 1.10 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gin/gindatapage.c,v 1.11 2008/06/19 00:46:03 alvherre Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include "postgres.h"
1616

1717
#include "access/gin.h"
1818
#include "storage/bufmgr.h"
19+
#include "utils/rel.h"
1920

2021
int
2122
compareItemPointers(ItemPointer a, ItemPointer b)

src/backend/access/gin/ginentrypage.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gin/ginentrypage.c,v 1.15 2008/06/08 22:00:46 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gin/ginentrypage.c,v 1.16 2008/06/19 00:46:03 alvherre Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414

@@ -17,6 +17,7 @@
1717
#include "access/gin.h"
1818
#include "access/tuptoaster.h"
1919
#include "storage/bufmgr.h"
20+
#include "utils/rel.h"
2021

2122
/*
2223
* forms tuple for entry tree. On leaf page, Index tuple has

src/backend/access/gin/ginget.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gin/ginget.c,v 1.16 2008/05/16 16:31:01 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gin/ginget.c,v 1.17 2008/06/19 00:46:03 alvherre Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include "postgres.h"
1616

1717
#include "access/gin.h"
18+
#include "access/relscan.h"
1819
#include "catalog/index.h"
1920
#include "miscadmin.h"
2021
#include "storage/bufmgr.h"

src/backend/access/gin/ginscan.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.14 2008/05/16 16:31:01 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.15 2008/06/19 00:46:03 alvherre Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include "postgres.h"
1616

17-
#include "access/genam.h"
1817
#include "access/gin.h"
18+
#include "access/relscan.h"
1919
#include "pgstat.h"
2020
#include "storage/bufmgr.h"
2121
#include "utils/memutils.h"
22+
#include "utils/rel.h"
2223

2324

2425
Datum

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