MCPcopy Create free account
hub / github.com/apache/cloudberry / get_rel_persistence

Function get_rel_persistence

src/backend/utils/cache/lsyscache.c:2703–2718  ·  view source on GitHub ↗

* get_rel_persistence * * Returns the relpersistence associated with a given relation. */

Source from the content-addressed store, hash-verified

2701 * Returns the relpersistence associated with a given relation.
2702 */
2703char
2704get_rel_persistence(Oid relid)
2705{
2706 HeapTuple tp;
2707 Form_pg_class reltup;
2708 char result;
2709
2710 tp = SearchSysCache1(RELOID, ObjectIdGetDatum(relid));
2711 if (!HeapTupleIsValid(tp))
2712 elog(ERROR, "cache lookup failed for relation %u", relid);
2713 reltup = (Form_pg_class) GETSTRUCT(tp);
2714 result = reltup->relpersistence;
2715 ReleaseSysCache(tp);
2716
2717 return result;
2718}
2719
2720
2721/* ---------- TRANSFORM CACHE ---------- */

Callers 8

DefineIndexFunction · 0.85
ReindexIndexFunction · 0.85
ReindexTableFunction · 0.85
ReindexMultipleInternalFunction · 0.85
getCurrentOfFunction · 0.85
index_dropFunction · 0.85

Calls 3

SearchSysCache1Function · 0.85
ObjectIdGetDatumFunction · 0.85
ReleaseSysCacheFunction · 0.85

Tested by

no test coverage detected