Move RelFileNumber declarations to common/relpath.h.

Previously, these were declared in postgres_ext.h, but they are not
needed nearly so widely as the OID declarations, so that doesn't
necessarily make sense. Also, because postgres_ext.h is included
before most of c.h has been processed, the previous location creates
some problems for a pending patch.

Patch by me, reviewed by Dilip Kumar.

Discussion: http://postgr.es/m/CA+TgmoYc8oevMqRokZQ4y_6aRn-7XQny1JBr5DyWR_jiFtONHw@mail.gmail.com
This commit is contained in:
Robert Haas 2022-09-27 12:01:57 -04:00
parent 7ac918ada0
commit 2f47715cc8
8 changed files with 14 additions and 8 deletions

View File

@ -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"

View File

@ -10,6 +10,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "common/relpath.h"
#include "libpq-fe.h"
/* For now, pg_upgrade does not use common/logging.c; use our own pg_fatal */

View File

@ -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;

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -15,6 +15,7 @@
#define RELCACHE_H
#include "access/tupdesc.h"
#include "common/relpath.h"
#include "nodes/bitmapset.h"