diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 119e054578f691c94d038bd47af57870fb64b18b..ae73d8169138ed6ec867e19cf482af0bf6476592 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.18 1998/01/15 18:59:53 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.19 1998/02/13 03:39:26 vadim Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -129,14 +129,14 @@ plan_union_queries(Query *parse)
 		List *hold_unionClause = parse->unionClause;
 
 		parse->unionClause = NIL;	/* prevent recursion */
-		union_plans = lcons(planner(parse), NIL);
+		union_plans = lcons(union_planner(parse), NIL);
 		union_rts = lcons(parse->rtable, NIL);
 
 		foreach(ulist, hold_unionClause)
 		{
 			Query *union_query = lfirst(ulist);
 
-			union_plans = lappend(union_plans, planner(union_query));
+			union_plans = lappend(union_plans, union_planner(union_query));
 			union_rts = lappend(union_rts, union_query->rtable);
 		}
 	}
@@ -159,7 +159,7 @@ plan_union_queries(Query *parse)
 		 *	Recursion, but UNION only.
 		 *	The last one is a UNION, so it will not come here in recursion,
 		 */
-		union_plans = lcons(planner(parse), NIL);
+		union_plans = lcons(union_planner(parse), NIL);
 		union_rts = lcons(parse->rtable, NIL);
 
 		/* Append the remainging UNION ALLs */
@@ -167,7 +167,7 @@ plan_union_queries(Query *parse)
 		{
 			Query	*unionall_query = lfirst(ulist);
 
-			union_plans = lappend(union_plans, planner(unionall_query));
+			union_plans = lappend(union_plans, union_planner(unionall_query));
 			union_rts = lappend(union_rts, unionall_query->rtable);
 		}
 	}
@@ -276,7 +276,7 @@ plan_inherit_query(List *relids,
 							  relid,
 							  new_root);
 
-		union_plans = lappend(union_plans, planner(new_root));
+		union_plans = lappend(union_plans, union_planner(new_root));
 		union_rtentries = lappend(union_rtentries, new_rt_entry);
 	}