1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Remove some recursion in optimizer and clean up some code there.

This commit is contained in:
Bruce Momjian
1997-12-21 05:18:48 +00:00
parent 0808e658a7
commit 78a055a659
4 changed files with 129 additions and 122 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.11 1997/12/20 07:59:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.12 1997/12/21 05:18:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -236,9 +236,13 @@ plan_union_query(List *relids,
new_root->uniqueFlag = NULL;
new_root->sortClause = NULL;
new_root->groupClause = NULL;
new_root->qry_numAgg = 0;
new_root->qry_aggs = NULL;
del_agg_tlist_references(new_root->targetList);
if (new_root->qry_numAgg != 0)
{
new_root->qry_numAgg = 0;
pfree(new_root->qry_aggs);
new_root->qry_aggs = NULL;
del_agg_tlist_references(new_root->targetList);
}
fix_parsetree_attnums(rt_index,
rt_entry->relid,
relid,