summaryrefslogtreecommitdiff
path: root/src/include/nodes/relation.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-06-10 03:32:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-06-10 03:32:25 +0000
commita87ee007edfa3d71e31cea4adad396888adbcd5a (patch)
treec2eeadb582711700d0de21d01ab3a994f8bfb716 /src/include/nodes/relation.h
parent453d74b99c9ba6e5e75d214b0d7bec13553ded89 (diff)
Quick hack to allow the outer query's tuple_fraction to be passed down
to a subquery if the outer query is simple enough that the LIMIT can be reflected directly to the subquery. This didn't use to be very interesting, because a subquery that couldn't have been flattened into the upper query was usually not going to be very responsive to tuple_fraction anyway. But with new code that allows UNION ALL subqueries to pay attention to tuple_fraction, this is useful to do. In particular this lets the optimization occur when the UNION ALL is directly inside a view.
Diffstat (limited to 'src/include/nodes/relation.h')
-rw-r--r--src/include/nodes/relation.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index ec839d7d3f6..687ef367841 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.113 2005/06/09 04:19:00 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.114 2005/06/10 03:32:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -92,6 +92,8 @@ typedef struct PlannerInfo
List *query_pathkeys; /* desired pathkeys for query_planner(),
* and actual pathkeys afterwards */
+ double tuple_fraction; /* tuple_fraction passed to query_planner */
+
bool hasJoinRTEs; /* true if any RTEs are RTE_JOIN kind */
bool hasHavingQual; /* true if havingQual was non-null */
} PlannerInfo;