diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/nodes/relation.h | 20 | ||||
-rw-r--r-- | src/include/optimizer/cost.h | 3 | ||||
-rw-r--r-- | src/include/optimizer/plancat.h | 4 | ||||
-rw-r--r-- | src/include/optimizer/predtest.h | 4 |
4 files changed, 23 insertions, 8 deletions
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 2f906c6a472..88e535dc9b9 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.116 2005/07/02 23:00:42 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.117 2005/07/23 21:05:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -516,6 +516,9 @@ typedef struct TidPath * AppendPath represents an Append plan, ie, successive execution of * several member plans. Currently it is only used to handle expansion * of inheritance trees. + * + * Note: it is possible for "subpaths" to contain only one, or even no, + * elements. These cases are optimized during create_append_plan. */ typedef struct AppendPath { @@ -524,10 +527,17 @@ typedef struct AppendPath } AppendPath; /* - * ResultPath represents use of a Result plan node, either to compute a - * variable-free targetlist or to gate execution of a subplan with a - * one-time (variable-free) qual condition. Note that in the former case - * path.parent will be NULL; in the latter case it is copied from the subpath. + * ResultPath represents use of a Result plan node. There are several + * applications for this: + * * To compute a variable-free targetlist (a "SELECT expressions" query). + * In this case subpath and path.parent will both be NULL. constantqual + * might or might not be empty ("SELECT expressions WHERE something"). + * * To gate execution of a subplan with a one-time (variable-free) qual + * condition. path.parent is copied from the subpath. + * * To substitute for a scan plan when we have proven that no rows in + * a table will satisfy the query. subpath is NULL but path.parent + * references the not-to-be-scanned relation, and constantqual is + * a constant FALSE. * * Note that constantqual is a list of bare clauses, not RestrictInfos. */ diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 5b6d2824253..a6988e45991 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.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/optimizer/cost.h,v 1.68 2005/06/05 22:32:58 tgl Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.69 2005/07/23 21:05:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -49,6 +49,7 @@ extern bool enable_hashagg; extern bool enable_nestloop; extern bool enable_mergejoin; extern bool enable_hashjoin; +extern bool enable_constraint_exclusion; extern double clamp_row_est(double nrows); extern void cost_seqscan(Path *path, PlannerInfo *root, RelOptInfo *baserel); diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h index f8ecd36110d..8a4c1e4941e 100644 --- a/src/include/optimizer/plancat.h +++ b/src/include/optimizer/plancat.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/optimizer/plancat.h,v 1.36 2005/06/05 22:32:58 tgl Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/plancat.h,v 1.37 2005/07/23 21:05:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,6 +19,8 @@ extern void get_relation_info(Oid relationObjectId, RelOptInfo *rel); +extern List *get_relation_constraints(Oid relationObjectId, RelOptInfo *rel); + extern List *build_physical_tlist(PlannerInfo *root, RelOptInfo *rel); extern List *find_inheritance_children(Oid inhparent); diff --git a/src/include/optimizer/predtest.h b/src/include/optimizer/predtest.h index cfa58f650a1..0fc0d0f4476 100644 --- a/src/include/optimizer/predtest.h +++ b/src/include/optimizer/predtest.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/optimizer/predtest.h,v 1.1 2005/06/10 22:25:37 tgl Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/predtest.h,v 1.2 2005/07/23 21:05:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,5 +19,7 @@ extern bool predicate_implied_by(List *predicate_list, List *restrictinfo_list); +extern bool predicate_refuted_by(List *predicate_list, + List *restrictinfo_list); #endif /* PREDTEST_H */ |