1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Replaced targetlist entry in GroupClause by reference number

in Resdom and GroupClause so changing of resno's doesn't confuse
the grouping any more.

Jan
This commit is contained in:
Jan Wieck
1999-05-12 15:02:39 +00:00
parent 1a87c14c9c
commit 79c2576f77
22 changed files with 242 additions and 199 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.50 1999/05/10 00:45:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.51 1999/05/12 15:01:37 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@ -260,7 +260,8 @@ union_planner(Query *parse)
* belong to?)
*/
check_having_for_ungrouped_vars(parse->havingQual,
parse->groupClause);
parse->groupClause,
parse->targetList);
}
/* Calculate the opfids from the opnos */
@ -426,8 +427,7 @@ make_subplanTargetList(Query *parse,
GroupClause *grpcl = (GroupClause *) lfirst(gl);
keyno++; /* sort key # for this GroupClause */
/* Is it safe to use just resno to match tlist and glist items?? */
if (grpcl->entry->resdom->resno == resdom->resno)
if (grpcl->tleGroupref == resdom->resgroupref)
{
/* Found a matching groupclause; record info for sorting */
foundGroupClause = true;