File tree 1 file changed +11
-2
lines changed
src/backend/optimizer/plan
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 10
10
*
11
11
*
12
12
* IDENTIFICATION
13
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.108 2001/08 /21 16:36:03 tgl Exp $
13
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.109 2001/09 /21 04:06:04 tgl Exp $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
@@ -1827,7 +1827,16 @@ make_result(List *tlist,
1827
1827
#ifdef NOT_USED
1828
1828
tlist = generate_fjoin (tlist );
1829
1829
#endif
1830
- copy_plan_costsize (plan , subplan );
1830
+ if (subplan )
1831
+ copy_plan_costsize (plan , subplan );
1832
+ else
1833
+ {
1834
+ plan -> startup_cost = 0 ;
1835
+ plan -> total_cost = cpu_tuple_cost ;
1836
+ plan -> plan_rows = 1 ; /* wrong if we have a set-valued function? */
1837
+ plan -> plan_width = 0 ; /* XXX try to be smarter? */
1838
+ }
1839
+
1831
1840
plan -> state = (EState * ) NULL ;
1832
1841
plan -> targetlist = tlist ;
1833
1842
plan -> qual = NIL ;
You can’t perform that action at this time.
0 commit comments