61 double index_pages,
int max_workers);
106 List **pushed_down_joins);
129 Oid req_type,
Oid req_collation);
147 bool require_parallel_safe);
150 bool require_parallel_safe);
181 List *setop_pathkeys);
217 bool require_parallel_safe);
229 Relids rel,
bool create_it);
231 List *subquery_pathkeys,
232 List *subquery_tlist);
236 List *outer_pathkeys);
243 bool remove_redundant,
244 bool remove_group_rtindex,
246 bool set_ec_sortref);
253 List *restrictinfos);
259 List *outer_pathkeys);
270 int strategy,
bool nulls_first);
272 List *live_childrels);
List * build_join_pathkeys(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype, List *outer_pathkeys)
void rebuild_eclass_attr_needed(PlannerInfo *root)
List * get_useful_group_keys_orderings(PlannerInfo *root, Path *path)
List * build_expression_pathkey(PlannerInfo *root, Expr *expr, Oid opno, Relids rel, bool create_it)
EquivalenceMember * find_ec_member_matching_expr(EquivalenceClass *ec, Expr *expr, Relids relids)
void add_child_rel_equivalences(PlannerInfo *root, AppendRelInfo *appinfo, RelOptInfo *parent_rel, RelOptInfo *child_rel)
bool is_redundant_with_indexclauses(RestrictInfo *rinfo, List *indexclauses)
void generate_base_implied_equalities(PlannerInfo *root)
bool exprs_known_equal(PlannerInfo *root, Node *item1, Node *item2, Oid opfamily)
PGDLLIMPORT int geqo_threshold
void generate_partitionwise_join_paths(PlannerInfo *root, RelOptInfo *rel)
RelOptInfo * standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels)
void join_search_one_level(PlannerInfo *root, int level)
RestrictInfo * find_derived_clause_for_ec_member(EquivalenceClass *ec, EquivalenceMember *em)
List * make_inner_pathkeys_for_merge(PlannerInfo *root, List *mergeclauses, List *outer_pathkeys)
PGDLLIMPORT set_rel_pathlist_hook_type set_rel_pathlist_hook
Path * get_cheapest_path_for_pathkeys(List *paths, List *pathkeys, Relids required_outer, CostSelector cost_criterion, bool require_parallel_safe)
bool pathkeys_count_contained_in(List *keys1, List *keys2, int *n_common)
List * make_pathkeys_for_sortclauses_extended(PlannerInfo *root, List **sortclauses, List *tlist, bool remove_redundant, bool remove_group_rtindex, bool *sortable, bool set_ec_sortref)
Expr * canonicalize_ec_expression(Expr *expr, Oid req_type, Oid req_collation)
bool relation_can_be_sorted_early(PlannerInfo *root, RelOptInfo *rel, EquivalenceClass *ec, bool require_parallel_safe)
List * find_mergeclauses_for_outer_pathkeys(PlannerInfo *root, List *pathkeys, List *restrictinfos)
void add_paths_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel, JoinType jointype, SpecialJoinInfo *sjinfo, List *restrictlist)
PGDLLIMPORT bool enable_group_by_reordering
bool has_useful_pathkeys(PlannerInfo *root, RelOptInfo *rel)
Relids add_outer_joins_to_relids(PlannerInfo *root, Relids input_relids, SpecialJoinInfo *sjinfo, List **pushed_down_joins)
List * append_pathkeys(List *target, List *source)
void(* set_join_pathlist_hook_type)(PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel, JoinType jointype, JoinPathExtraData *extra)
void check_index_predicates(PlannerInfo *root, RelOptInfo *rel)
List * truncate_useless_pathkeys(PlannerInfo *root, RelOptInfo *rel, List *pathkeys)
bool process_equivalence(PlannerInfo *root, RestrictInfo **p_restrictinfo, JoinDomain *jdomain)
RelOptInfo *(* join_search_hook_type)(PlannerInfo *root, int levels_needed, List *initial_rels)
int compute_parallel_worker(RelOptInfo *rel, double heap_pages, double index_pages, int max_workers)
void generate_gather_paths(PlannerInfo *root, RelOptInfo *rel, bool override_rows)
List * generate_join_implied_equalities_for_ecs(PlannerInfo *root, List *eclasses, Relids join_relids, Relids outer_relids, RelOptInfo *inner_rel)
List * trim_mergeclauses_for_inner_pathkeys(PlannerInfo *root, List *mergeclauses, List *pathkeys)
void(* set_rel_pathlist_hook_type)(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTblEntry *rte)
List * select_outer_pathkeys_for_merge(PlannerInfo *root, List *mergeclauses, RelOptInfo *joinrel)
void update_mergeclause_eclasses(PlannerInfo *root, RestrictInfo *restrictinfo)
bool relation_has_unique_index_for(PlannerInfo *root, RelOptInfo *rel, List *restrictlist, List *exprlist, List *oprlist)
PGDLLIMPORT int min_parallel_table_scan_size
List * build_index_pathkeys(PlannerInfo *root, IndexOptInfo *index, ScanDirection scandir)
EquivalenceClass * get_eclass_for_sort_expr(PlannerInfo *root, Expr *expr, List *opfamilies, Oid opcintype, Oid collation, Index sortref, Relids rel, bool create_it)
List * generate_join_implied_equalities(PlannerInfo *root, Relids join_relids, Relids outer_relids, RelOptInfo *inner_rel, SpecialJoinInfo *sjinfo)
bool have_relevant_eclass_joinclause(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
void create_index_paths(PlannerInfo *root, RelOptInfo *rel)
RelOptInfo * make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
List * generate_implied_equalities_for_column(PlannerInfo *root, RelOptInfo *rel, ec_matches_callback_type callback, void *callback_arg, Relids prohibited_rels)
PathKey * make_canonical_pathkey(PlannerInfo *root, EquivalenceClass *eclass, Oid opfamily, int strategy, bool nulls_first)
void generate_useful_gather_paths(PlannerInfo *root, RelOptInfo *rel, bool override_rows)
void mark_dummy_rel(RelOptInfo *rel)
bool have_dangerous_phv(PlannerInfo *root, Relids outer_relids, Relids inner_params)
void add_setop_child_rel_equivalences(PlannerInfo *root, RelOptInfo *child_rel, List *child_tlist, List *setop_pathkeys)
Path * get_cheapest_parallel_safe_total_inner(List *paths)
void reconsider_outer_join_clauses(PlannerInfo *root)
bool have_join_order_restriction(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
bool eclass_useful_for_merging(PlannerInfo *root, EquivalenceClass *eclass, RelOptInfo *rel)
List * make_pathkeys_for_sortclauses(PlannerInfo *root, List *sortclauses, List *tlist)
PGDLLIMPORT int min_parallel_index_scan_size
void add_child_join_rel_equivalences(PlannerInfo *root, int nappinfos, AppendRelInfo **appinfos, RelOptInfo *parent_joinrel, RelOptInfo *child_joinrel)
List * convert_subquery_pathkeys(PlannerInfo *root, RelOptInfo *rel, List *subquery_pathkeys, List *subquery_tlist)
EquivalenceClass * match_eclasses_to_foreign_key_col(PlannerInfo *root, ForeignKeyOptInfo *fkinfo, int colno)
void initialize_mergeclause_eclasses(PlannerInfo *root, RestrictInfo *restrictinfo)
bool create_tidscan_paths(PlannerInfo *root, RelOptInfo *rel)
bool match_index_to_operand(Node *operand, int indexcol, IndexOptInfo *index)
void init_dummy_sjinfo(SpecialJoinInfo *sjinfo, Relids left_relids, Relids right_relids)
Path * get_cheapest_fractional_path_for_pathkeys(List *paths, List *pathkeys, Relids required_outer, double fraction)
bool is_redundant_derived_clause(RestrictInfo *rinfo, List *clauselist)
void create_partial_bitmap_paths(PlannerInfo *root, RelOptInfo *rel, Path *bitmapqual)
bool pathkeys_contained_in(List *keys1, List *keys2)
PathKeysComparison compare_pathkeys(List *keys1, List *keys2)
PGDLLIMPORT join_search_hook_type join_search_hook
void add_paths_to_append_rel(PlannerInfo *root, RelOptInfo *rel, List *live_childrels)
bool indexcol_is_bool_constant_for_query(PlannerInfo *root, IndexOptInfo *index, int indexcol)
EquivalenceMember * find_computable_ec_member(PlannerInfo *root, EquivalenceClass *ec, List *exprs, Relids relids, bool require_parallel_safe)
RelOptInfo * make_one_rel(PlannerInfo *root, List *joinlist)
List * build_partition_pathkeys(PlannerInfo *root, RelOptInfo *partrel, ScanDirection scandir, bool *partialkeys)
bool has_relevant_eclass_joinclause(PlannerInfo *root, RelOptInfo *rel1)
PGDLLIMPORT bool enable_geqo
bool(* ec_matches_callback_type)(PlannerInfo *root, RelOptInfo *rel, EquivalenceClass *ec, EquivalenceMember *em, void *arg)
PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook
static rewind_source * source
static struct cvec * eclass(struct vars *v, chr c, int cases)
static void callback(struct sockaddr *addr, struct sockaddr *mask, void *unused)