File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/backend/optimizer/plan Expand file tree Collapse file tree 1 file changed +6
-6
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/optimizer/plan/planmain.c,v 1.7 1997/09/08 21:45:24 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.8 1997/09/25 12: 21:15 vadim Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -394,7 +394,6 @@ make_groupPlan(List **tlist,
394
394
Group * grpplan ;
395
395
int numCols ;
396
396
AttrNumber * grpColIdx ;
397
- int keyno = 1 ;
398
397
int last_resno = 1 ;
399
398
400
399
numCols = length (groupClause );
@@ -412,13 +411,15 @@ make_groupPlan(List **tlist,
412
411
*/
413
412
foreach (sl , sort_tlist )
414
413
{
415
- Resdom * resdom = NULL ;
416
- TargetEntry * te = (TargetEntry * ) lfirst (sl );
414
+ Resdom * resdom = NULL ;
415
+ TargetEntry * te = (TargetEntry * ) lfirst (sl );
416
+ int keyno = 0 ;
417
417
418
- foreach (gl , glc )
418
+ foreach (gl , groupClause )
419
419
{
420
420
GroupClause * grpcl = (GroupClause * ) lfirst (gl );
421
421
422
+ keyno ++ ;
422
423
if (grpcl -> entry -> resdom -> resno == te -> resdom -> resno )
423
424
{
424
425
@@ -427,7 +428,6 @@ make_groupPlan(List **tlist,
427
428
resdom -> reskeyop = get_opcode (grpcl -> grpOpoid );
428
429
resdom -> resno = last_resno ; /* re-set */
429
430
grpColIdx [keyno - 1 ] = last_resno ++ ;
430
- keyno ++ ;
431
431
glc = lremove (lfirst (gl ), glc ); /* TLE found for it */
432
432
break ;
433
433
}
You can’t perform that action at this time.
0 commit comments