Rename macro to RELKIND_HAS_STORAGE
authorAlvaro Herrera <[email protected]>
Fri, 4 Jan 2019 17:34:18 +0000 (14:34 -0300)
committerAlvaro Herrera <[email protected]>
Fri, 4 Jan 2019 17:34:18 +0000 (14:34 -0300)
The original name was an unfortunate choice.

Discussion: https://postgr.es/m/20181218.145600.172055615[email protected]

src/backend/commands/copy.c
src/backend/commands/tablecmds.c
src/include/catalog/pg_class.h

index acd992bf0c76edbcaf3bfaa29286b83c61b2dc5f..a61a62847119d2f8be59c14c09bb7fb604e57ed0 100644 (file)
@@ -2405,7 +2405,7 @@ CopyFrom(CopyState cstate)
         *----------
         */
        /* createSubid is creation check, newRelfilenodeSubid is truncation check */
-       if (RELKIND_CAN_HAVE_STORAGE(cstate->rel->rd_rel->relkind) &&
+       if (RELKIND_HAS_STORAGE(cstate->rel->rd_rel->relkind) &&
                (cstate->rel->rd_createSubid != InvalidSubTransactionId ||
                 cstate->rel->rd_newRelfilenodeSubid != InvalidSubTransactionId))
        {
index e1af2c449537ccc8030a4d6ad2952d6f126c9a82..c75c5808ba11daeef579eb69db45d02668eb0fd9 100644 (file)
@@ -11003,7 +11003,7 @@ ATExecSetTableSpaceNoStorage(Relation rel, Oid newTableSpace)
         * Shouldn't be called on relations having storage; these are processed
         * in phase 3.
         */
-       Assert(!RELKIND_CAN_HAVE_STORAGE(rel->rd_rel->relkind));
+       Assert(!RELKIND_HAS_STORAGE(rel->rd_rel->relkind));
 
        /* Can't allow a non-shared relation in pg_global */
        if (newTableSpace == GLOBALTABLESPACE_OID)
index 002f7fac92dde5c0489e57eb43b4656351159f72..5d82ce09a6c1988899a06d95665d4a14ddb5b2e6 100644 (file)
@@ -127,7 +127,7 @@ typedef FormData_pg_class *Form_pg_class;
  * relfilenode set to non-zero, but it can also be zero if the relation is
  * mapped.
  */
-#define RELKIND_CAN_HAVE_STORAGE(relkind) \
+#define RELKIND_HAS_STORAGE(relkind) \
        ((relkind) == RELKIND_RELATION || \
         (relkind) == RELKIND_INDEX || \
         (relkind) == RELKIND_SEQUENCE || \