|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.38 1998/09/01 04:28:22 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.39 1998/09/23 04:22:06 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -629,7 +629,8 @@ ExecGetIndexKeyInfo(Form_pg_index indexTuple,
|
629 | 629 | * ----------------
|
630 | 630 | */
|
631 | 631 | numKeys=0;
|
632 |
| -for (i=0;i<8&&indexTuple->indkey[i]!=0;i++) |
| 632 | +for (i=0;i<INDEX_MAX_KEYS&& |
| 633 | +indexTuple->indkey[i]!=InvalidAttrNumber;i++) |
633 | 634 | numKeys++;
|
634 | 635 |
|
635 | 636 | /* ----------------
|
@@ -663,8 +664,7 @@ ExecGetIndexKeyInfo(Form_pg_index indexTuple,
|
663 | 664 | */
|
664 | 665 | CXT1_printf("ExecGetIndexKeyInfo: context is %d\n",CurrentMemoryContext);
|
665 | 666 |
|
666 |
| -attKeys= (AttrNumber*) |
667 |
| -palloc(numKeys*sizeof(AttrNumber)); |
| 667 | +attKeys= (AttrNumber*)palloc(numKeys*sizeof(AttrNumber)); |
668 | 668 |
|
669 | 669 | for (i=0;i<numKeys;i++)
|
670 | 670 | attKeys[i]=indexTuple->indkey[i];
|
|