mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Implementation of UNIONs.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.15 1997/12/22 05:42:08 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.16 1997/12/24 06:06:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -81,11 +81,19 @@ planner(Query *parse)
|
||||
int rt_index;
|
||||
|
||||
|
||||
/*
|
||||
* plan inheritance
|
||||
*/
|
||||
rt_index = first_matching_rt_entry(rangetable, INHERITS_FLAG);
|
||||
if (rt_index != -1)
|
||||
if (parse->unionClause)
|
||||
{
|
||||
result_plan = (Plan *) plan_union_queries(0, /* none */
|
||||
parse,
|
||||
UNION_FLAG);
|
||||
/* XXX do we need to do this? bjm 12/19/97 */
|
||||
tlist = preprocess_targetlist(tlist,
|
||||
parse->commandType,
|
||||
parse->resultRelation,
|
||||
parse->rtable);
|
||||
}
|
||||
else if ((rt_index =
|
||||
first_matching_rt_entry(rangetable, INHERITS_FLAG)) != -1)
|
||||
{
|
||||
result_plan = (Plan *) plan_union_queries((Index) rt_index,
|
||||
parse,
|
||||
|
Reference in New Issue
Block a user