|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.31 1999/01/23 23:28:08 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.32 1999/01/24 00:28:20 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -611,8 +611,8 @@ replace_result_clause(Node *clause,
|
611 | 611 | ((Var *) clause)->varno = (Index) OUTER;
|
612 | 612 | ((Var *) clause)->varattno = subplanVar->resdom->resno;
|
613 | 613 | }
|
614 |
| - else if (IsA(clause, Aggreg)) |
615 |
| - replace_result_clause(((Aggreg *) clause)->target, subplanTargetList); |
| 614 | + else if (IsA(clause, Aggref)) |
| 615 | + replace_result_clause(((Aggref *) clause)->target, subplanTargetList); |
616 | 616 | else if (is_funcclause(clause))
|
617 | 617 | {
|
618 | 618 | List *subExpr;
|
@@ -704,7 +704,7 @@ OperandIsInner(Node *opnd, int inner_relid)
|
704 | 704 | * changes the target list of an Agg node so that it points to
|
705 | 705 | * the tuples returned by its left tree subplan.
|
706 | 706 | *
|
707 |
| - * We now also generate a linked list of Aggreg pointers for Agg. |
| 707 | + * We now also generate a linked list of Aggref pointers for Agg. |
708 | 708 | *
|
709 | 709 | */
|
710 | 710 | List *
|
@@ -765,10 +765,10 @@ replace_agg_clause(Node *clause, List *subplanTargetList)
|
765 | 765 | }
|
766 | 766 | return agg_list;
|
767 | 767 | }
|
768 |
| - else if (IsA(clause, Aggreg)) |
| 768 | + else if (IsA(clause, Aggref)) |
769 | 769 | {
|
770 | 770 | return lcons(clause,
|
771 |
| - replace_agg_clause(((Aggreg *) clause)->target, subplanTargetList)); |
| 771 | + replace_agg_clause(((Aggref *) clause)->target, subplanTargetList)); |
772 | 772 | }
|
773 | 773 | else if (IsA(clause, ArrayRef))
|
774 | 774 | {
|
@@ -866,11 +866,11 @@ del_agg_clause(Node *clause)
|
866 | 866 | foreach(t, ((Expr *) clause)->args)
|
867 | 867 | lfirst(t) = del_agg_clause(lfirst(t));
|
868 | 868 | }
|
869 |
| - else if (IsA(clause, Aggreg)) |
| 869 | + else if (IsA(clause, Aggref)) |
870 | 870 | {
|
871 | 871 |
|
872 | 872 | /* here is the real action, to remove the Agg node */
|
873 |
| - return del_agg_clause(((Aggreg *) clause)->target); |
| 873 | + return del_agg_clause(((Aggref *) clause)->target); |
874 | 874 |
|
875 | 875 | }
|
876 | 876 | else if (IsA(clause, ArrayRef))
|
@@ -967,10 +967,10 @@ check_having_qual_for_vars(Node *clause, List *targetlist_so_far)
|
967 | 967 | }
|
968 | 968 | return targetlist_so_far;
|
969 | 969 | }
|
970 |
| - else if (IsA(clause, Aggreg)) |
| 970 | + else if (IsA(clause, Aggref)) |
971 | 971 | {
|
972 | 972 | targetlist_so_far =
|
973 |
| - check_having_qual_for_vars(((Aggreg *) clause)->target, targetlist_so_far); |
| 973 | + check_having_qual_for_vars(((Aggref *) clause)->target, targetlist_so_far); |
974 | 974 | return targetlist_so_far;
|
975 | 975 | }
|
976 | 976 | else if (IsA(clause, ArrayRef))
|
@@ -1100,10 +1100,10 @@ check_having_qual_for_aggs(Node *clause, List *subplanTargetList, List *groupCla
|
1100 | 1100 | }
|
1101 | 1101 | return agg_list;
|
1102 | 1102 | }
|
1103 |
| - else if (IsA(clause, Aggreg)) |
| 1103 | + else if (IsA(clause, Aggref)) |
1104 | 1104 | {
|
1105 | 1105 | return lcons(clause,
|
1106 |
| - check_having_qual_for_aggs(((Aggreg *) clause)->target, subplanTargetList, |
| 1106 | + check_having_qual_for_aggs(((Aggref *) clause)->target, subplanTargetList, |
1107 | 1107 | groupClause));
|
1108 | 1108 | }
|
1109 | 1109 | else if (IsA(clause, ArrayRef))
|
|
0 commit comments