| 744 | |
| 745 | |
| 746 | inline static Oid |
| 747 | GetIndexAmOid(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 | |
| 771 | inline static bool |
no outgoing calls
no test coverage detected