aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/cache/relcache.c2
-rw-r--r--src/backend/utils/sort/tuplesort.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index e81c4691ec2..fd2a3cc8c3d 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -5065,7 +5065,7 @@ restart:
/* Collect simple attribute references */
for (i = 0; i < indexInfo->ii_NumIndexAttrs; i++)
{
- int attrnum = indexInfo->ii_KeyAttrNumbers[i];
+ int attrnum = indexInfo->ii_IndexAttrNumbers[i];
/*
* Since we have covering indexes with non-key columns, we must
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index a0c0d6f701a..e6a8d22feb2 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -3718,7 +3718,7 @@ comparetup_cluster(const SortTuple *a, const SortTuple *b,
datum2;
bool isnull1,
isnull2;
- AttrNumber leading = state->indexInfo->ii_KeyAttrNumbers[0];
+ AttrNumber leading = state->indexInfo->ii_IndexAttrNumbers[0];
/* Be prepared to compare additional sort keys */
ltup = (HeapTuple) a->tuple;
@@ -3761,7 +3761,7 @@ comparetup_cluster(const SortTuple *a, const SortTuple *b,
for (; nkey < state->nKeys; nkey++, sortKey++)
{
- AttrNumber attno = state->indexInfo->ii_KeyAttrNumbers[nkey];
+ AttrNumber attno = state->indexInfo->ii_IndexAttrNumbers[nkey];
datum1 = heap_getattr(ltup, attno, tupDesc, &isnull1);
datum2 = heap_getattr(rtup, attno, tupDesc, &isnull2);
@@ -3833,11 +3833,11 @@ copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup)
* set up first-column key value, and potentially abbreviate, if it's a
* simple column
*/
- if (state->indexInfo->ii_KeyAttrNumbers[0] == 0)
+ if (state->indexInfo->ii_IndexAttrNumbers[0] == 0)
return;
original = heap_getattr(tuple,
- state->indexInfo->ii_KeyAttrNumbers[0],
+ state->indexInfo->ii_IndexAttrNumbers[0],
state->tupDesc,
&stup->isnull1);
@@ -3881,7 +3881,7 @@ copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup)
tuple = (HeapTuple) mtup->tuple;
mtup->datum1 = heap_getattr(tuple,
- state->indexInfo->ii_KeyAttrNumbers[0],
+ state->indexInfo->ii_IndexAttrNumbers[0],
state->tupDesc,
&mtup->isnull1);
}
@@ -3935,9 +3935,9 @@ readtup_cluster(Tuplesortstate *state, SortTuple *stup,
&tuplen, sizeof(tuplen));
stup->tuple = (void *) tuple;
/* set up first-column key value, if it's a simple column */
- if (state->indexInfo->ii_KeyAttrNumbers[0] != 0)
+ if (state->indexInfo->ii_IndexAttrNumbers[0] != 0)
stup->datum1 = heap_getattr(tuple,
- state->indexInfo->ii_KeyAttrNumbers[0],
+ state->indexInfo->ii_IndexAttrNumbers[0],
state->tupDesc,
&stup->isnull1);
}