File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.14 1997/03/27 04:13:44 vadim Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.15 1997/04/05 03:36:21 vadim Exp $
11
11
*
12
12
*
13
13
* INTERFACE ROUTINES
@@ -369,9 +369,13 @@ ConstructTupleDescriptor(Oid heapoid,
369
369
if (atnum > natts )
370
370
elog (WARN , "Cannot create index: attribute %d does not exist" ,
371
371
atnum );
372
- IndexKey = (IndexElem * ) lfirst (attributeList );
373
- attributeList = lnext (attributeList );
374
- IndexKeyType = IndexKey -> tname ;
372
+ if (attributeList ) {
373
+ IndexKey = (IndexElem * ) lfirst (attributeList );
374
+ attributeList = lnext (attributeList );
375
+ IndexKeyType = IndexKey -> tname ;
376
+ } else {
377
+ IndexKeyType = NULL ;
378
+ }
375
379
376
380
indexTupDesc -> attrs [i ] = (AttributeTupleForm ) palloc (ATTRIBUTE_TUPLE_SIZE );
377
381
You can’t perform that action at this time.
0 commit comments