aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/commands/statscmds.c4
-rw-r--r--src/backend/optimizer/util/plancat.c4
-rw-r--r--src/include/access/table.h10
3 files changed, 4 insertions, 14 deletions
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index f51eb7bb64e..0ab43deb714 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -637,7 +637,7 @@ UpdateStatisticsForTypeChange(Oid statsOid, Oid relationOid, int attnum,
replaces[Anum_pg_statistic_ext_data_stxdmcv - 1] = true;
nulls[Anum_pg_statistic_ext_data_stxdmcv - 1] = true;
- rel = heap_open(StatisticExtDataRelationId, RowExclusiveLock);
+ rel = table_open(StatisticExtDataRelationId, RowExclusiveLock);
/* replace the old tuple */
stup = heap_modify_tuple(oldtup,
@@ -651,7 +651,7 @@ UpdateStatisticsForTypeChange(Oid statsOid, Oid relationOid, int attnum,
heap_freetuple(stup);
- heap_close(rel, RowExclusiveLock);
+ table_close(rel, RowExclusiveLock);
}
/*
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index cf1761401dd..e5f9e04d659 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -2103,12 +2103,12 @@ has_stored_generated_columns(PlannerInfo *root, Index rti)
bool result = false;
/* Assume we already have adequate lock */
- relation = heap_open(rte->relid, NoLock);
+ relation = table_open(rte->relid, NoLock);
tupdesc = RelationGetDescr(relation);
result = tupdesc->constr && tupdesc->constr->has_generated_stored;
- heap_close(relation, NoLock);
+ table_close(relation, NoLock);
return result;
}
diff --git a/src/include/access/table.h b/src/include/access/table.h
index 44b0af70f4e..cb9b43881b5 100644
--- a/src/include/access/table.h
+++ b/src/include/access/table.h
@@ -25,14 +25,4 @@ extern Relation table_openrv_extended(const RangeVar *relation,
LOCKMODE lockmode, bool missing_ok);
extern void table_close(Relation relation, LOCKMODE lockmode);
-/*
- * heap_ used to be the prefix for these routines, and a lot of code will just
- * continue to work without adaptions after the introduction of pluggable
- * storage, therefore just map these names.
- */
-#define heap_open(r, l) table_open(r, l)
-#define heap_openrv(r, l) table_openrv(r, l)
-#define heap_openrv_extended(r, l, m) table_openrv_extended(r, l, m)
-#define heap_close(r, l) table_close(r, l)
-
#endif /* TABLE_H */