aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/rel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/rel.h')
-rw-r--r--src/include/utils/rel.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index a7c3aa95c27..bc20950cc8a 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -450,13 +450,12 @@ typedef struct ViewOptions
/*
* RelationIsMapped
- * True if the relation uses the relfilenode map.
- *
- * NB: this is only meaningful for relkinds that have storage, else it
- * will misleadingly say "true".
+ * True if the relation uses the relfilenode map. Note multiple eval
+ * of argument!
*/
#define RelationIsMapped(relation) \
- ((relation)->rd_rel->relfilenode == InvalidOid)
+ (RELKIND_HAS_STORAGE((relation)->rd_rel->relkind) && \
+ ((relation)->rd_rel->relfilenode == InvalidOid))
/*
* RelationOpenSmgr