MCPcopy Create free account
hub / github.com/documentdb/documentdb / GetIndexAmOid

Function GetIndexAmOid

pg_documentdb/src/explain/documentdb_explain.c:746–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744
745
746inline static Oid
747GetIndexAmOid(IndexScanDescData *scanDesc, Oid indexOid)
748{
749 Oid indexAmOid;
750 if (scanDesc)
751 {
752 indexAmOid = scanDesc->indexRelation->rd_rel->relam;
753 }
754 else
755 {
756 Relation rel = RelationIdGetRelation(indexOid);
757 if (rel == NULL)
758 {
759 ereport(ERROR, (errmsg("Could not open relation for index OID: %d",
760 indexOid)));
761 }
762
763 indexAmOid = rel->rd_rel->relam;
764 RelationClose(rel);
765 }
766
767 return indexAmOid;
768}
769
770
771inline static bool

Callers 3

LogIndexScanDetailsFunction · 0.85
WriteIndexExecutionStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected