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

Function get_typisdefined

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

* get_typisdefined * * Given the type OID, determine whether the type is defined * (if not, it's only a shell). */

Source from the content-addressed store, hash-verified

2771 * (if not, it's only a shell).
2772 */
2773bool
2774get_typisdefined(Oid typid)
2775{
2776 HeapTuple tp;
2777
2778 tp = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typid));
2779 if (HeapTupleIsValid(tp))
2780 {
2781 Form_pg_type typtup = (Form_pg_type) GETSTRUCT(tp);
2782 bool result;
2783
2784 result = typtup->typisdefined;
2785 ReleaseSysCache(tp);
2786 return result;
2787 }
2788 else
2789 return false;
2790}
2791
2792/*
2793 * get_typlen

Callers 4

DefineTypeFunction · 0.85
DefineRangeFunction · 0.85
RenameTypeInternalFunction · 0.85
moveArrayTypeNameFunction · 0.85

Calls 3

SearchSysCache1Function · 0.85
ObjectIdGetDatumFunction · 0.85
ReleaseSysCacheFunction · 0.85

Tested by

no test coverage detected