* RelationGetReplicaIndex -- get OID of the relation's replica identity index * * Returns InvalidOid if there is no such index. */
| 5149 | * Returns InvalidOid if there is no such index. |
| 5150 | */ |
| 5151 | Oid |
| 5152 | RelationGetReplicaIndex(Relation relation) |
| 5153 | { |
| 5154 | List *ilist; |
| 5155 | |
| 5156 | if (!relation->rd_indexvalid) |
| 5157 | { |
| 5158 | /* RelationGetIndexList does the heavy lifting. */ |
| 5159 | ilist = RelationGetIndexList(relation); |
| 5160 | list_free(ilist); |
| 5161 | Assert(relation->rd_indexvalid); |
| 5162 | } |
| 5163 | |
| 5164 | return relation->rd_replidindex; |
| 5165 | } |
| 5166 | |
| 5167 | /* |
| 5168 | * RelationGetIndexExpressions -- get the index expressions for an index |
no test coverage detected