* GetBitmapIndexAuxOids - Given an open index, fetch and return the oids for * the bitmap subobjects (pg_bm_xxxx + pg_bm_xxxx_index). * * Note: Currently this information is not stored directly in the catalog, but * is hidden away inside the metadata page of the index. Future versions should * move this information into the catalog. */
| 1096 | * move this information into the catalog. |
| 1097 | */ |
| 1098 | void |
| 1099 | GetBitmapIndexAuxOids(Relation index, Oid *heapId, Oid *indexId) |
| 1100 | { |
| 1101 | Buffer metabuf; |
| 1102 | BMMetaPage metapage; |
| 1103 | |
| 1104 | |
| 1105 | /* Only Bitmap Indexes have bitmap related sub-objects */ |
| 1106 | if (!RelationIsBitmapIndex(index)) |
| 1107 | { |
| 1108 | *heapId = InvalidOid; |
| 1109 | *indexId = InvalidOid; |
| 1110 | return; |
| 1111 | } |
| 1112 | |
| 1113 | metabuf = _bitmap_getbuf(index, BM_METAPAGE, BM_READ); |
| 1114 | metapage = _bitmap_get_metapage_data(index, metabuf); |
| 1115 | |
| 1116 | *heapId = metapage->bm_lov_heapId; |
| 1117 | *indexId = metapage->bm_lov_indexId; |
| 1118 | |
| 1119 | _bitmap_relbuf(metabuf); |
| 1120 | } |
| 1121 | |
| 1122 | bytea * |
| 1123 | bmoptions(Datum reloptions, bool validate) |
no test coverage detected