diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index f8c4cb8d18..bd9b066e4e 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -55,6 +55,7 @@ #include "catalog/pg_trigger_d.h" #include "catalog/pg_type_d.h" #include "common/connect.h" +#include "common/relpath.h" #include "dumputils.h" #include "fe_utils/option_utils.h" #include "fe_utils/string_utils.h" diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index e379aa4669..31589b0fdc 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -10,6 +10,7 @@ #include #include +#include "common/relpath.h" #include "libpq-fe.h" /* For now, pg_upgrade does not use common/logging.c; use our own pg_fatal */ diff --git a/src/include/catalog/binary_upgrade.h b/src/include/catalog/binary_upgrade.h index fd934427ad..b7b7d3be00 100644 --- a/src/include/catalog/binary_upgrade.h +++ b/src/include/catalog/binary_upgrade.h @@ -14,6 +14,8 @@ #ifndef BINARY_UPGRADE_H #define BINARY_UPGRADE_H +#include "common/relpath.h" + extern PGDLLIMPORT Oid binary_upgrade_next_pg_tablespace_oid; extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid; diff --git a/src/include/common/relpath.h b/src/include/common/relpath.h index 3ab713247f..4bbd94393c 100644 --- a/src/include/common/relpath.h +++ b/src/include/common/relpath.h @@ -19,6 +19,13 @@ */ #include "catalog/catversion.h" /* pgrminclude ignore */ +/* + * RelFileNumber data type identifies the specific relation file name. + */ +typedef Oid RelFileNumber; +#define InvalidRelFileNumber ((RelFileNumber) InvalidOid) +#define RelFileNumberIsValid(relnumber) \ + ((bool) ((relnumber) != InvalidRelFileNumber)) /* * Name of major-version-specific tablespace subdirectories diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index aead2afd6e..633e7671b3 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -22,6 +22,7 @@ #ifndef PARSENODES_H #define PARSENODES_H +#include "common/relpath.h" #include "nodes/bitmapset.h" #include "nodes/lockoptions.h" #include "nodes/primnodes.h" diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index dca2a21e7a..21e642a64c 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -16,6 +16,7 @@ #include "access/sdir.h" #include "access/stratnum.h" +#include "common/relpath.h" #include "lib/stringinfo.h" #include "nodes/bitmapset.h" #include "nodes/lockoptions.h" diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index c9774fa010..240ad4e93b 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -46,14 +46,6 @@ typedef unsigned int Oid; /* Define a signed 64-bit integer type for use in client API declarations. */ typedef PG_INT64_TYPE pg_int64; -/* - * RelFileNumber data type identifies the specific relation file name. - */ -typedef Oid RelFileNumber; -#define InvalidRelFileNumber ((RelFileNumber) InvalidOid) -#define RelFileNumberIsValid(relnumber) \ - ((bool) ((relnumber) != InvalidRelFileNumber)) - /* * Identifiers of error message fields. Kept here to keep common * between frontend and backend, and also to export them to libpq diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index 73106b6fc0..ce57e7ce4e 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -15,6 +15,7 @@ #define RELCACHE_H #include "access/tupdesc.h" +#include "common/relpath.h" #include "nodes/bitmapset.h"