8000 Move RelFileNumber declarations to common/relpath.h. · postgrespro/postgres@2f47715 · GitHub
[go: up one dir, main page]

Skip to content
  • Commit 2f47715

    Browse files
    committed
    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
    1 parent 7ac918a commit 2f47715

    File tree

    8 files changed

    +14
    -8
    lines changed

    8 files changed

    +14
    -8
    lines changed

    src/bin/pg_dump/pg_dump.c

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -55,6 +55,7 @@
    5555
    #include "catalog/pg_trigger_d.h"
    5656
    #include "catalog/pg_type_d.h"
    5757
    #include "common/connect.h"
    58+
    #include "common/relpath.h"
    5859
    #include "dumputils.h"
    5960
    #include "fe_utils/option_utils.h"
    6061
    #include "fe_utils/string_utils.h"

    src/bin/pg_upgrade/pg_upgrade.h

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -10,6 +10,7 @@
    1010
    #include <sys/stat.h>
    1111
    #include <sys/time.h>
    1212

    13+
    #include "common/relpath.h"
    1314
    #include "libpq-fe.h"
    1415

    1516
    /* For now, pg_upgrade does not use common/logging.c; use our own pg_fatal */

    src/include/catalog/binary_upgrade.h

    Lines changed: 2 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -14,6 +14,8 @@
    1414
    #ifndef BINARY_UPGRADE_H
    1515
    #define BINARY_UPGRADE_H
    1616

    17+
    #include "common/relpath.h"
    18+
    1719
    extern PGDLLIMPORT Oid binary_upgrade_next_pg_tablespace_oid;
    1820

    1921
    extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid;

    src/include/common/relpath.h

    Lines changed: 7 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -19,6 +19,13 @@
    1919
    */
    2020
    #include "catalog/catversion.h" /* pgrminclude ignore */
    2121

    22+
    /*
    23+
    * RelFileNumber data type identifies the specific relation file name.
    24+
    */
    25+
    typedef Oid RelFileNumber;
    26+
    #define InvalidRelFileNumber ((RelFileNumber) InvalidOid)
    27+
    #define RelFileNumberIsValid(relnumber) \
    28+
    ((bool) ((relnumber) != InvalidRelFileNumber))
    2229

    2330
    /*
    2431
    * Name of major-version-specific tablespace subdirectories

    src/include/nodes/parsenodes.h

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -22,6 +22,7 @@
    2222
    #ifndef PARSENODES_H
    2323
    #define PARSENODES_H
    2424

    25+
    #include "common/relpath.h"
    2526
    #include "nodes/bitmapset.h"
    2627
    #include "nodes/lockoptions.h"
    2728
    #include "nodes/primnodes.h"

    src/include/nodes/plannodes.h

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

    1717
    #include "access/sdir.h"
    1818
    #include "access/stratnum.h"
    19+
    #include "common/relpath.h"
    1920
    #include "lib/stringinfo.h"
    2021
    #include "nodes/bitmapset.h"
    2122
    #include "nodes/lockoptions.h"

    src/include/postgres_ext.h

    Lines changed: 0 additions & 8 deletions
    Original file line numberDiff line numberDiff line change
    @@ -46,14 +46,6 @@ typedef unsigned int Oid;
    4646
    /* Define a signed 64-bit integer type for use in client API declarations. */
    4747
    typedef PG_INT64_TYPE pg_int64;
    4848

    49-
    /*
    50-
    * RelFileNumber data type identifies the specific relation file name.
    51-
    */
    52-
    typedef Oid RelFileNumber;
    53-
    #define InvalidRelFileNumber ((RelFileNumber) InvalidOid)
    54-
    #define RelFileNumberIsValid(relnumber) \
    55-
    ((bool) ((relnumber) != InvalidRelFileNumber))
    56-
    5749
    /*
    5850
    * Identifiers of error message fields. Kept here to keep common
    5951
    * between frontend and backend, and also to export them to libpq

    src/include/utils/relcache.h

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -15,6 +15,7 @@
    1515
    #define RELCACHE_H
    1616

    1717
    #include "access/tupdesc.h"
    18+
    #include "common/relpath.h"
    1819
    #include "nodes/bitmapset.h"
    1920

    2021

    0 commit comments

    Comments
     (0)
    0