Content-Length: 268515 | pFad | http://github.com/postgrespro/postgres/commit/7f17fd6fc7125b41218bc99ccfa8165e2d730cd9

32 Fix CompareIndexInfo's attnum comparisons · postgrespro/postgres@7f17fd6 · GitHub
Skip to content

Commit 7f17fd6

Browse files
committed
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 8b08f7d. At least, it solves the issue in my local 32bit VM -- let's see what the rest thinks.
1 parent 8b9e964 commit 7f17fd6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/catalog/index.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,8 +1795,10 @@ CompareIndexInfo(IndexInfo *info1, IndexInfo *info2,
17951795
if (maplen < info2->ii_KeyAttrNumbers[i])
17961796
elog(ERROR, "incorrect attribute map");
17971797

1798-
if (attmap[info2->ii_KeyAttrNumbers[i] - 1] !=
1799-
info1->ii_KeyAttrNumbers[i])
1798+
/* ignore expressions at this stage */
1799+
if ((info1->ii_KeyAttrNumbers[i] != InvalidAttrNumber) &&
1800+
(attmap[info2->ii_KeyAttrNumbers[i] - 1] !=
1801+
info1->ii_KeyAttrNumbers[i]))
18001802
return false;
18011803

18021804
if (collations1[i] != collations2[i])

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/7f17fd6fc7125b41218bc99ccfa8165e2d730cd9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy