hi:in allpath.c ,the
set_plan_rel_pathlist() function has a parameter of RangeTblEntry type.what
does we use this varaible to do ?i doesn't see any code in this function
using it .In optimizer module, it look like that we can get
most information from Query . Is it right ?so , what time use Query?
what time use RangeTblEntry? Are there any rule?Kao
136 /*137 *
set_plain_rel_pathlist138 * Build access
paths for a plain relation (no subquery, no inheritance)139 */140
static void141 set_plain_rel_pathlist(Query *root, RelOptInfo *rel,
RangeTblEntry *rte)142 {143 /* Mark rel with
estimated output rows, width, etc */144
set_baserel_size_estimates(root, rel);145 146
/*147 * Generate paths and add them
to the rel's pathlist.148 *149
* Note: add_path() will discard any paths that are
dominated by another150 * available path,
keeping only those paths that are superior along at151
* least one dimension of cost or sortedness.152
*/153 154 /* Consider
sequential scan */155 add_path(rel,
create_seqscan_path(root, rel));156 157 /*
Consider TID scans */158
create_tidscan_paths(root, rel);159 160 /*
Consider index paths for both simple and OR index clauses */161
create_index_paths(root, rel);162 163
/* create_index_paths must be done before create_or_index_paths
*/164 create_or_index_paths(root, rel);165
166 /* Now find the cheapest of the paths for
this rel */167 set_cheapest(rel);168
}169 --