diff options
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index d2639036223..c8c64d9a425 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -721,7 +721,7 @@ DefineIndex(Oid relationId, errdetail("%s constraints cannot be used when partition keys include expressions.", constraint_type))); - for (j = 0; j < indexInfo->ii_NumIndexAttrs; j++) + for (j = 0; j < indexInfo->ii_NumIndexKeyAttrs; j++) { if (key->partattrs[i] == indexInfo->ii_IndexAttrNumbers[j]) { |