Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+2-1
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

+2-1
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

+2-1
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

+2-1
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

+2-3
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

+2-1
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

+2-1
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

+2-1
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

+2-1
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

+3-2
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

src/backend/access/gist/gistget.c

+2-1
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/gist/gistget.c,v 1.73 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.74 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include "postgres.h"
1616

1717
#include "access/gist_private.h"
18+
#include "access/relscan.h"
1819
#include "executor/execdebug.h"
1920
#include "miscadmin.h"
2021
#include "pgstat.h"

src/backend/access/gist/gistscan.c

+2-1
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/gist/gistscan.c,v 1.69 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gist/gistscan.c,v 1.70 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -17,6 +17,7 @@
1717
#include "access/genam.h"
1818
#include "access/gist_private.h"
1919
#include "access/gistscan.h"
20+
#include "access/relscan.h"
2021
#include "storage/bufmgr.h"
2122
#include "utils/memutils.h"
2223

src/backend/access/gist/gistsplit.c

+2-1
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/gist/gistsplit.c,v 1.5 2008/01/01 19:45:46 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gist/gistsplit.c,v 1.6 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include "postgres.h"
1616

1717
#include "access/gist_private.h"
18+
#include "utils/rel.h"
1819

1920
typedef struct
2021
{

src/backend/access/gist/gistutil.c

+2-1
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/gist/gistutil.c,v 1.28 2008/06/15 01:41:37 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.29 2008/06/19 00:46:03 alvherre Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include "postgres.h"
@@ -18,6 +18,7 @@
1818
#include "storage/freespace.h"
1919
#include "storage/lmgr.h"
2020
#include "storage/bufmgr.h"
21+
#include "utils/rel.h"
2122

2223
/*
2324
* static *S used for temrorary storage (saves stack and palloc() call)

src/backend/access/gist/gistxlog.c

+2-1
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/gist/gistxlog.c,v 1.29 2008/06/12 09:12:30 heikki Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gist/gistxlog.c,v 1.30 2008/06/19 00:46:03 alvherre Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include "postgres.h"
@@ -18,6 +18,7 @@
1818
#include "miscadmin.h"
1919
#include "storage/bufmgr.h"
2020
#include "utils/memutils.h"
21+
#include "utils/rel.h"
2122

2223

2324
typedef struct

src/backend/access/hash/hash.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.103 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.104 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
* NOTES
1414
* This file contains only the public interface routines.
@@ -18,8 +18,8 @@
1818

1919
#include "postgres.h"
2020

21-
#include "access/genam.h"
2221
#include "access/hash.h"
22+
#include "access/relscan.h"
2323
#include "catalog/index.h"
2424
#include "commands/vacuum.h"
2525
#include "miscadmin.h"

src/backend/access/hash/hashinsert.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.49 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.50 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -17,6 +17,7 @@
1717

1818
#include "access/hash.h"
1919
#include "storage/bufmgr.h"
20+
#include "utils/rel.h"
2021

2122

2223
static OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf,

src/backend/access/hash/hashovfl.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/hash/hashovfl.c,v 1.63 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/hash/hashovfl.c,v 1.64 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
* NOTES
1414
* Overflow pages look like ordinary relation pages.
@@ -19,6 +19,7 @@
1919

2020
#include "access/hash.h"
2121
#include "storage/bufmgr.h"
22+
#include "utils/rel.h"
2223

2324

2425
static Buffer _hash_getovflpage(Relation rel, Buffer metabuf);

src/backend/access/hash/hashscan.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/hash/hashscan.c,v 1.44 2008/03/07 15:59:03 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/hash/hashscan.c,v 1.45 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515

1616
#include "postgres.h"
1717

1818
#include "access/hash.h"
19+
#include "access/relscan.h"
1920
#include "utils/memutils.h"
21+
#include "utils/rel.h"
2022
#include "utils/resowner.h"
2123

2224

src/backend/access/hash/hashsearch.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.52 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.53 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include "postgres.h"
1616

1717
#include "access/hash.h"
18+
#include "access/relscan.h"
1819
#include "pgstat.h"
1920
#include "storage/bufmgr.h"
21+
#include "utils/rel.h"
2022

2123

2224
/*

src/backend/access/hash/hashutil.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/hash/hashutil.c,v 1.54 2008/05/12 00:00:44 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/hash/hashutil.c,v 1.55 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include "postgres.h"
1616

17-
#include "access/genam.h"
1817
#include "access/hash.h"
1918
#include "access/reloptions.h"
19+
#include "access/relscan.h"
2020
#include "executor/execdebug.h"
2121
#include "storage/bufmgr.h"
2222
#include "utils/lsyscache.h"

src/backend/access/heap/heapam.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.259 2008/06/12 09:12:30 heikki Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.260 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -42,6 +42,7 @@
4242
#include "access/heapam.h"
4343
#include "access/hio.h"
4444
#include "access/multixact.h"
45+
#include "access/relscan.h"
4546
#include "access/sysattr.h"
4647
#include "access/transam.h"
4748
#include "access/tuptoaster.h"

src/backend/access/heap/pruneheap.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/heap/pruneheap.c,v 1.14 2008/06/12 09:12:30 heikki Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/heap/pruneheap.c,v 1.15 2008/06/19 00:46:03 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -22,6 +22,7 @@
2222
#include "storage/bufmgr.h"
2323
#include "storage/off.h"
2424
#include "utils/inval.h"
25+
#include "utils/rel.h"
2526
#include "utils/tqual.h"
2627

2728

0 commit comments

Comments
 (0)