compare-exclusion-index-info.patch
text/x-diff
Filename: compare-exclusion-index-info.patch
Type: text/x-diff
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/catalog/index.c | 8 | 2 |
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 739a92bdcc1..5b00047a290 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -2645,9 +2645,15 @@ CompareIndexInfo(const IndexInfo *info1, const IndexInfo *info2,
return false;
}
- /* No support currently for comparing exclusion indexes. */
- if (info1->ii_ExclusionOps != NULL || info2->ii_ExclusionOps != NULL)
+ if ((info1->ii_ExclusionOps == NULL) != (info2->ii_ExclusionOps == NULL))
return false;
+ if (info1->ii_ExclusionOps != NULL)
+ {
+ for (i = 0; i < info1->ii_NumIndexAttrs; i++) {
+ if (info1->ii_ExclusionOps[i] != info2->ii_ExclusionOps[i])
+ return false;
+ }
+ }
return true;
}