@@ -239,7 +239,7 @@ index_check_primary_key(Relation heapRel,
239239 cmds = NIL ;
240240 for (i = 0 ; i < indexInfo -> ii_NumIndexKeyAttrs ; i ++ )
241241 {
242- AttrNumber attnum = indexInfo -> ii_KeyAttrNumbers [i ];
242+ AttrNumber attnum = indexInfo -> ii_IndexAttrNumbers [i ];
243243 HeapTuple atttuple ;
244244 Form_pg_attribute attform ;
245245
@@ -324,7 +324,7 @@ ConstructTupleDescriptor(Relation heapRelation,
324324 */
325325 for (i = 0 ; i < numatts ; i ++ )
326326 {
327- AttrNumber atnum = indexInfo -> ii_KeyAttrNumbers [i ];
327+ AttrNumber atnum = indexInfo -> ii_IndexAttrNumbers [i ];
328328 Form_pg_attribute to = TupleDescAttr (indexTupDesc , i );
329329 HeapTuple tuple ;
330330 Form_pg_type typeTup ;
@@ -607,7 +607,7 @@ UpdateIndexRelation(Oid indexoid,
607607 */
608608 indkey = buildint2vector (NULL , indexInfo -> ii_NumIndexAttrs );
609609 for (i = 0 ; i < indexInfo -> ii_NumIndexAttrs ; i ++ )
610- indkey -> values [i ] = indexInfo -> ii_KeyAttrNumbers [i ];
610+ indkey -> values [i ] = indexInfo -> ii_IndexAttrNumbers [i ];
611611 indcollation = buildoidvector (collationOids , indexInfo -> ii_NumIndexAttrs );
612612 indclass = buildoidvector (classOids , indexInfo -> ii_NumIndexKeyAttrs );
613613 indoption = buildint2vector (coloptions , indexInfo -> ii_NumIndexAttrs );
@@ -1041,11 +1041,11 @@ index_create(Relation heapRelation,
10411041 /* Create auto dependencies on simply-referenced columns */
10421042 for (i = 0 ; i < indexInfo -> ii_NumIndexAttrs ; i ++ )
10431043 {
1044- if (indexInfo -> ii_KeyAttrNumbers [i ] != 0 )
1044+ if (indexInfo -> ii_IndexAttrNumbers [i ] != 0 )
10451045 {
10461046 referenced .classId = RelationRelationId ;
10471047 referenced .objectId = heapRelationId ;
1048- referenced .objectSubId = indexInfo -> ii_KeyAttrNumbers [i ];
1048+ referenced .objectSubId = indexInfo -> ii_IndexAttrNumbers [i ];
10491049
10501050 recordDependencyOn (& myself , & referenced , deptype );
10511051
@@ -1297,7 +1297,7 @@ index_constraint_create(Relation heapRelation,
12971297 true,
12981298 parentConstraintId ,
12991299 RelationGetRelid (heapRelation ),
1300- indexInfo -> ii_KeyAttrNumbers ,
1300+ indexInfo -> ii_IndexAttrNumbers ,
13011301 indexInfo -> ii_NumIndexKeyAttrs ,
13021302 indexInfo -> ii_NumIndexAttrs ,
13031303 InvalidOid , /* no domain */
@@ -1757,7 +1757,7 @@ BuildIndexInfo(Relation index)
17571757 Assert (ii -> ii_NumIndexKeyAttrs <= ii -> ii_NumIndexAttrs );
17581758
17591759 for (i = 0 ; i < numAtts ; i ++ )
1760- ii -> ii_KeyAttrNumbers [i ] = indexStruct -> indkey .values [i ];
1760+ ii -> ii_IndexAttrNumbers [i ] = indexStruct -> indkey .values [i ];
17611761
17621762 /* fetch any expressions needed for expressional indexes */
17631763 ii -> ii_Expressions = RelationGetIndexExpressions (index );
@@ -1840,13 +1840,13 @@ CompareIndexInfo(IndexInfo *info1, IndexInfo *info2,
18401840 */
18411841 for (i = 0 ; i < info1 -> ii_NumIndexAttrs ; i ++ )
18421842 {
1843- if (maplen < info2 -> ii_KeyAttrNumbers [i ])
1843+ if (maplen < info2 -> ii_IndexAttrNumbers [i ])
18441844 elog (ERROR , "incorrect attribute map" );
18451845
18461846 /* ignore expressions at this stage */
1847- if ((info1 -> ii_KeyAttrNumbers [i ] != InvalidAttrNumber ) &&
1848- (attmap [info2 -> ii_KeyAttrNumbers [i ] - 1 ] !=
1849- info1 -> ii_KeyAttrNumbers [i ]))
1847+ if ((info1 -> ii_IndexAttrNumbers [i ] != InvalidAttrNumber ) &&
1848+ (attmap [info2 -> ii_IndexAttrNumbers [i ] - 1 ] !=
1849+ info1 -> ii_IndexAttrNumbers [i ]))
18501850 return false;
18511851
18521852 if (collations1 [i ] != collations2 [i ])
@@ -2007,7 +2007,7 @@ FormIndexDatum(IndexInfo *indexInfo,
20072007
20082008 for (i = 0 ; i < indexInfo -> ii_NumIndexAttrs ; i ++ )
20092009 {
2010- int keycol = indexInfo -> ii_KeyAttrNumbers [i ];
2010+ int keycol = indexInfo -> ii_IndexAttrNumbers [i ];
20112011 Datum iDatum ;
20122012 bool isNull ;
20132013
0 commit comments