Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c850ec

Browse files
committed
Don't include heapam.h from others headers.
heapam.h previously was included in a number of widely usedheaders (e.g. execnodes.h, indirectly in executor.h, ...). That'sproblematic on its own, as heapam.h contains a lot of low-leveldetails that don't need to be exposed that widely, but becomes moreproblematic with the upcoming introduction of pluggable table storage- it seems inappropriate for heapam.h to be included that widelyafterwards.heapam.h was largely only included in other headers to get theHeapScanDesc typedef (which was defined in heapam.h, even thoughHeapScanDescData is defined in relscan.h). The better solution hereseems to be to just use the underlying struct (forward declared wherenecessary). Similar for BulkInsertState.Another problem was that LockTupleMode was used in executor.h - partsof the file tried to cope without heapam.h, but due to the fact thatit indirectly included it, several subsequent violations of that goalwere not not noticed. We could just reuse the approach of declaringparameters as int, but it seems nicer to move LockTupleMode tolockoptions.h - that's not a perfect location, but also doesn't seembad.As a number of files relied on implicitly included heapam.h, asignificant number of files grew an explicit include. It's quiteprobably that a few external projects will need to do the same.Author: Andres FreundReviewed-By: Alvaro HerreraDiscussion:https://postgr.es/m/20190114000701.y4ttcb74jpskkcfb@alap3.anarazel.de
1 parent42e2a58 commit4c850ec

File tree

71 files changed

+91
-36
lines changed

Some content is hidden

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

71 files changed

+91
-36
lines changed

‎contrib/amcheck/verify_nbtree.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424
#include"postgres.h"
2525

26+
#include"access/heapam.h"
2627
#include"access/htup_details.h"
2728
#include"access/nbtree.h"
2829
#include"access/transam.h"

‎contrib/dblink/dblink.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
#include"access/htup_details.h"
4040
#include"access/reloptions.h"
41+
#include"access/heapam.h"
4142
#include"catalog/indexing.h"
4243
#include"catalog/namespace.h"
4344
#include"catalog/pg_foreign_data_wrapper.h"

‎contrib/file_fdw/file_fdw.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include"access/htup_details.h"
1919
#include"access/reloptions.h"
2020
#include"access/sysattr.h"
21+
#include"access/heapam.h"
2122
#include"catalog/pg_authid.h"
2223
#include"catalog/pg_foreign_table.h"
2324
#include"commands/copy.h"

‎contrib/pageinspect/btreefuncs.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include"pageinspect.h"
3131

3232
#include"access/nbtree.h"
33+
#include"access/heapam.h"
3334
#include"catalog/namespace.h"
3435
#include"catalog/pg_am.h"
3536
#include"funcapi.h"

‎contrib/pageinspect/heapfuncs.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include"pageinspect.h"
2929

30+
#include"access/heapam.h"
3031
#include"access/htup_details.h"
3132
#include"funcapi.h"
3233
#include"catalog/pg_type.h"

‎contrib/pageinspect/rawpage.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include"pageinspect.h"
1919

2020
#include"access/htup_details.h"
21+
#include"access/heapam.h"
2122
#include"catalog/namespace.h"
2223
#include"catalog/pg_type.h"
2324
#include"funcapi.h"

‎contrib/pg_freespacemap/pg_freespacemap.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
#include"postgres.h"
1010

11+
#include"access/heapam.h"
1112
#include"funcapi.h"
1213
#include"storage/freespace.h"
1314

‎contrib/pg_visibility/pg_visibility.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111
#include"postgres.h"
1212

13+
#include"access/heapam.h"
1314
#include"access/htup_details.h"
1415
#include"access/visibilitymap.h"
1516
#include"catalog/pg_type.h"

‎contrib/pgrowlocks/pgrowlocks.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include"postgres.h"
2626

27+
#include"access/heapam.h"
2728
#include"access/multixact.h"
2829
#include"access/relscan.h"
2930
#include"access/xact.h"

‎contrib/pgstattuple/pgstatapprox.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include"postgres.h"
1414

1515
#include"access/visibilitymap.h"
16+
#include"access/heapam.h"
1617
#include"access/transam.h"
1718
#include"access/xact.h"
1819
#include"access/multixact.h"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp