Since pluggable storage has been introduced, those two routines have
been replaced by table_open/close, with some compatibility macros still
present to allow extensions to compile correctly with v12.
Some code paths using the old routines still remained, so replace them.
Based on the discussion done, the consensus reached is that it is better
to remove those compatibility macros so as nothing new uses the old
routines, so remove also the compatibility macros.
Discussion: https://postgr.es/m/
20191017014706.GF5605@paquier.xyz
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,
heap_freetuple(stup);
- heap_close(rel, RowExclusiveLock);
+ table_close(rel, RowExclusiveLock);
}
/*
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;
}
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 */