@@ -239,7 +239,7 @@ index_check_primary_key(Relation heapRel,
239
239
cmds = NIL ;
240
240
for (i = 0 ; i < indexInfo -> ii_NumIndexKeyAttrs ; i ++ )
241
241
{
242
- AttrNumber attnum = indexInfo -> ii_KeyAttrNumbers [i ];
242
+ AttrNumber attnum = indexInfo -> ii_IndexAttrNumbers [i ];
243
243
HeapTuple atttuple ;
244
244
Form_pg_attribute attform ;
245
245
@@ -324,7 +324,7 @@ ConstructTupleDescriptor(Relation heapRelation,
324
324
*/
325
325
for (i = 0 ; i < numatts ; i ++ )
326
326
{
327
- AttrNumber atnum = indexInfo -> ii_KeyAttrNumbers [i ];
327
+ AttrNumber atnum = indexInfo -> ii_IndexAttrNumbers [i ];
328
328
Form_pg_attribute to = TupleDescAttr (indexTupDesc , i );
329
329
HeapTuple tuple ;
330
330
Form_pg_type typeTup ;
@@ -607,7 +607,7 @@ UpdateIndexRelation(Oid indexoid,
607
607
*/
608
608
indkey = buildint2vector (NULL , indexInfo -> ii_NumIndexAttrs );
609
609
for (i = 0 ; i < indexInfo -> ii_NumIndexAttrs ; i ++ )
610
- indkey -> values [i ] = indexInfo -> ii_KeyAttrNumbers [i ];
610
+ indkey -> values [i ] = indexInfo -> ii_IndexAttrNumbers [i ];
611
611
indcollation = buildoidvector (collationOids , indexInfo -> ii_NumIndexAttrs );
612
612
indclass = buildoidvector (classOids , indexInfo -> ii_NumIndexKeyAttrs );
613
613
indoption = buildint2vector (coloptions , indexInfo -> ii_NumIndexAttrs );
@@ -1041,11 +1041,11 @@ index_create(Relation heapRelation,
1041
1041
/* Create auto dependencies on simply-referenced columns */
1042
1042
for (i = 0 ; i < indexInfo -> ii_NumIndexAttrs ; i ++ )
1043
1043
{
1044
- if (indexInfo -> ii_KeyAttrNumbers [i ] != 0 )
1044
+ if (indexInfo -> ii_IndexAttrNumbers [i ] != 0 )
1045
1045
{
1046
1046
referenced .classId = RelationRelationId ;
1047
1047
referenced .objectId = heapRelationId ;
1048
- referenced .objectSubId = indexInfo -> ii_KeyAttrNumbers [i ];
1048
+ referenced .objectSubId = indexInfo -> ii_IndexAttrNumbers [i ];
1049
1049
1050
1050
recordDependencyOn (& myself , & referenced , deptype );
1051
1051
@@ -1297,7 +1297,7 @@ index_constraint_create(Relation heapRelation,
1297
1297
true,
1298
1298
parentConstraintId ,
1299
1299
RelationGetRelid (heapRelation ),
1300
- indexInfo -> ii_KeyAttrNumbers ,
1300
+ indexInfo -> ii_IndexAttrNumbers ,
1301
1301
indexInfo -> ii_NumIndexKeyAttrs ,
1302
1302
indexInfo -> ii_NumIndexAttrs ,
1303
1303
InvalidOid , /* no domain */
@@ -1757,7 +1757,7 @@ BuildIndexInfo(Relation index)
1757
1757
Assert (ii -> ii_NumIndexKeyAttrs <= ii -> ii_NumIndexAttrs );
1758
1758
1759
1759
for (i = 0 ; i < numAtts ; i ++ )
1760
- ii -> ii_KeyAttrNumbers [i ] = indexStruct -> indkey .values [i ];
1760
+ ii -> ii_IndexAttrNumbers [i ] = indexStruct -> indkey .values [i ];
1761
1761
1762
1762
/* fetch any expressions needed for expressional indexes */
1763
1763
ii -> ii_Expressions = RelationGetIndexExpressions (index );
@@ -1840,13 +1840,13 @@ CompareIndexInfo(IndexInfo *info1, IndexInfo *info2,
1840
1840
*/
1841
1841
for (i = 0 ; i < info1 -> ii_NumIndexAttrs ; i ++ )
1842
1842
{
1843
- if (maplen < info2 -> ii_KeyAttrNumbers [i ])
1843
+ if (maplen < info2 -> ii_IndexAttrNumbers [i ])
1844
1844
elog (ERROR , "incorrect attribute map" );
1845
1845
1846
1846
/* 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 ]))
1850
1850
return false;
1851
1851
1852
1852
if (collations1 [i ] != collations2 [i ])
@@ -2007,7 +2007,7 @@ FormIndexDatum(IndexInfo *indexInfo,
2007
2007
2008
2008
for (i = 0 ; i < indexInfo -> ii_NumIndexAttrs ; i ++ )
2009
2009
{
2010
- int keycol = indexInfo -> ii_KeyAttrNumbers [i ];
2010
+ int keycol = indexInfo -> ii_IndexAttrNumbers [i ];
2011
2011
Datum iDatum ;
2012
2012
bool isNull ;
2013
2013
0 commit comments