Commit 7f17fd6f authored by Alvaro Herrera's avatar Alvaro Herrera

Fix CompareIndexInfo's attnum comparisons

When an index column is an expression, it makes no sense to compare its
attribute numbers.

This seems to account for remaining buildfarm fallout from 8b08f7d4.
At least, it solves the issue in my local 32bit VM -- let's see what the
rest thinks.
parent 8b9e9644
...@@ -1795,8 +1795,10 @@ CompareIndexInfo(IndexInfo *info1, IndexInfo *info2, ...@@ -1795,8 +1795,10 @@ CompareIndexInfo(IndexInfo *info1, IndexInfo *info2,
if (maplen < info2->ii_KeyAttrNumbers[i]) if (maplen < info2->ii_KeyAttrNumbers[i])
elog(ERROR, "incorrect attribute map"); elog(ERROR, "incorrect attribute map");
if (attmap[info2->ii_KeyAttrNumbers[i] - 1] != /* ignore expressions at this stage */
info1->ii_KeyAttrNumbers[i]) if ((info1->ii_KeyAttrNumbers[i] != InvalidAttrNumber) &&
(attmap[info2->ii_KeyAttrNumbers[i] - 1] !=
info1->ii_KeyAttrNumbers[i]))
return false; return false;
if (collations1[i] != collations2[i]) if (collations1[i] != collations2[i])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment