|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Typedefs | |
| typedef struct ExplainState | ExplainState |
| typedef PlannedStmt *(* | planner_hook_type) (Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams, ExplainState *es) |
| typedef void(* | planner_setup_hook_type) (PlannerGlobal *glob, Query *parse, const char *query_string, double *tuple_fraction, ExplainState *es) |
| typedef void(* | planner_shutdown_hook_type) (PlannerGlobal *glob, Query *parse, const char *query_string, PlannedStmt *pstmt) |
| typedef void(* | create_upper_paths_hook_type) (PlannerInfo *root, UpperRelationKind stage, RelOptInfo *input_rel, RelOptInfo *output_rel, void *extra) |
Functions | |
| PlannedStmt * | standard_planner (Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams, ExplainState *es) |
| PlannerInfo * | subquery_planner (PlannerGlobal *glob, Query *parse, char *plan_name, PlannerInfo *parent_root, bool hasRecursion, double tuple_fraction, SetOperationStmt *setops) |
| RowMarkType | select_rowmark_type (RangeTblEntry *rte, LockClauseStrength strength) |
| bool | limit_needed (Query *parse) |
| void | mark_partial_aggref (Aggref *agg, AggSplit aggsplit) |
| Path * | get_cheapest_fractional_path (RelOptInfo *rel, double tuple_fraction) |
| Expr * | preprocess_phv_expression (PlannerInfo *root, Expr *expr) |
| RelOptInfo * | create_unique_paths (PlannerInfo *root, RelOptInfo *rel, SpecialJoinInfo *sjinfo) |
| char * | choose_plan_name (PlannerGlobal *glob, const char *name, bool always_number) |
| typedef void(* create_upper_paths_hook_type) (PlannerInfo *root, UpperRelationKind stage, RelOptInfo *input_rel, RelOptInfo *output_rel, void *extra) |
| typedef PlannedStmt *(* planner_hook_type) (Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams, ExplainState *es) |
| typedef void(* planner_setup_hook_type) (PlannerGlobal *glob, Query *parse, const char *query_string, double *tuple_fraction, ExplainState *es) |
| typedef void(* planner_shutdown_hook_type) (PlannerGlobal *glob, Query *parse, const char *query_string, PlannedStmt *pstmt) |
|
extern |
Definition at line 9022 of file planner.c.
References fb(), foreach_ptr, lappend(), name, pfree(), psprintf(), and pstrdup().
Referenced by build_minmax_path(), make_subplan(), recurse_set_operations(), set_subquery_pathlist(), and SS_process_ctes().
|
extern |
Definition at line 8470 of file planner.c.
References adjust_appendrel_attrs_multilevel(), Assert, assignSortGroupRef(), bms_equal(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, copy_pathtarget(), create_final_unique_paths(), create_partial_unique_paths(), create_pathtarget, elog, ERROR, fb(), forboth, get_compatible_hash_operators(), get_equality_op_for_ordering_op(), get_ordering_op_for_equality_op(), GetMemoryChunkContext(), IS_OTHER_REL, JOIN_SEMI, SpecialJoinInfo::jointype, lappend(), lfirst, lfirst_oid, list_delete_last(), list_length(), make_pathkeys_for_sortclauses(), make_tlist_from_pathtarget(), makeNode, makeTargetEntry(), MemoryContextSwitchTo(), NIL, OidIsValid, RelOptInfo::partial_pathlist, RelOptInfo::pathlist, RelOptInfo::ppilist, RelOptInfo::relids, RelOptInfo::reltarget, root, SpecialJoinInfo::semi_can_btree, SpecialJoinInfo::semi_can_hash, SpecialJoinInfo::semi_operators, SpecialJoinInfo::semi_rhs_exprs, set_cheapest(), SpecialJoinInfo::syn_righthand, tlist_member(), RelOptInfo::unique_groupclause, RelOptInfo::unique_pathkeys, and RelOptInfo::unique_rel.
Referenced by join_is_legal(), and populate_joinrel_with_paths().
|
extern |
Definition at line 6655 of file planner.c.
References RelOptInfo::cheapest_total_path, compare_fractional_path_costs(), fb(), lfirst, and RelOptInfo::pathlist.
Referenced by add_paths_to_append_rel(), make_subplan(), and standard_planner().
Definition at line 2838 of file planner.c.
References DatumGetInt64(), fb(), IsA, and parse().
Referenced by grouping_planner(), and set_rel_consider_parallel().
Definition at line 5816 of file planner.c.
References AGGSPLIT_SIMPLE, Assert, DO_AGGSPLIT_SERIALIZE, DO_AGGSPLIT_SKIPFINAL, fb(), and OidIsValid.
Referenced by convert_combining_aggrefs(), create_rel_agg_info(), and make_partial_grouping_target().
|
extern |
Definition at line 1478 of file planner.c.
References EXPRKIND_PHV, preprocess_expression(), and root.
Referenced by extract_lateral_references().
|
extern |
Definition at line 2587 of file planner.c.
References elog, ERROR, fb(), GetFdwRoutineByRelId(), FdwRoutine::GetForeignRowMarkType, LCS_FORKEYSHARE, LCS_FORNOKEYUPDATE, LCS_FORSHARE, LCS_FORUPDATE, LCS_NONE, ROW_MARK_COPY, ROW_MARK_EXCLUSIVE, ROW_MARK_KEYSHARE, ROW_MARK_NOKEYEXCLUSIVE, ROW_MARK_REFERENCE, ROW_MARK_SHARE, and RTE_RELATION.
Referenced by expand_single_inheritance_child(), and preprocess_rowmarks().
|
extern |
Definition at line 333 of file planner.c.
References PlannerGlobal::allRelids, PlannerGlobal::appendRelations, PlannedStmt::appendRelations, Assert, bms_difference(), PlannedStmt::canSetTag, CMD_SELECT, PlannedStmt::commandType, create_plan(), CURSOR_OPT_FAST_PLAN, CURSOR_OPT_PARALLEL_OK, CURSOR_OPT_SCROLL, cursor_tuple_fraction, DEBUG_PARALLEL_OFF, debug_parallel_query, DEBUG_PARALLEL_REGRESS, PlannerGlobal::default_pgs_mask, PlannerGlobal::dependsOnRole, PlannedStmt::dependsOnRole, DestroyPartitionDirectory(), enable_bitmapscan, enable_gathermerge, enable_hashjoin, enable_indexonlyscan, enable_indexscan, enable_material, enable_memoize, enable_mergejoin, enable_nestloop, enable_partitionwise_join, enable_seqscan, enable_tidscan, ExecSupportsBackwardScan(), fb(), fetch_upper_rel(), PlannerGlobal::finalrowmarks, PlannerGlobal::finalrtable, PlannerGlobal::finalrteperminfos, forboth, get_cheapest_fractional_path(), PlannedStmt::hasModifyingCTE, PlannedStmt::hasReturning, PlannerGlobal::invalItems, PlannedStmt::invalItems, IsParallelWorker, IsUnderPostmaster, jit_above_cost, jit_enabled, jit_expressions, jit_inline_above_cost, jit_optimize_above_cost, jit_tuple_deforming, PlannedStmt::jitFlags, PlannerGlobal::lastPHId, PlannerGlobal::lastPlanNodeId, PlannerGlobal::lastRowMarkId, lfirst, lfirst_node, list_length(), makeNode, materialize_finished_plan(), max_parallel_hazard(), max_parallel_workers_per_gather, PlannerGlobal::maxParallelHazard, NIL, parallel_setup_cost, parallel_tuple_cost, PlannerGlobal::parallelModeNeeded, PlannedStmt::parallelModeNeeded, PlannerGlobal::parallelModeOK, PlannerGlobal::paramExecTypes, PlannedStmt::paramExecTypes, parse(), PlannerGlobal::partPruneInfos, PlannedStmt::partPruneInfos, PlannedStmt::permInfos, PGJIT_DEFORM, PGJIT_EXPR, PGJIT_INLINE, PGJIT_NONE, PGJIT_OPT3, PGJIT_PERFORM, PGS_APPEND, PGS_BITMAPSCAN, PGS_CONSIDER_INDEXONLY, PGS_CONSIDER_NONPARTIAL, PGS_CONSIDER_PARTITIONWISE, PGS_FOREIGNJOIN, PGS_GATHER, PGS_GATHER_MERGE, PGS_HASHJOIN, PGS_INDEXONLYSCAN, PGS_INDEXSCAN, PGS_MERGE_APPEND, PGS_MERGEJOIN_MATERIALIZE, PGS_MERGEJOIN_PLAIN, PGS_NESTLOOP_MATERIALIZE, PGS_NESTLOOP_MEMOIZE, PGS_NESTLOOP_PLAIN, PGS_SEQSCAN, PGS_TIDSCAN, PLAN_STMT_STANDARD, planner_setup_hook, planner_shutdown_hook, PlannedStmt::planOrigin, PlannedStmt::planTree, PlannerGlobal::prunableRelids, PlannedStmt::queryId, PlannerGlobal::relationOids, PlannedStmt::relationOids, PlannerGlobal::resultRelations, PlannedStmt::resultRelations, PlannerGlobal::rewindPlanIDs, PlannedStmt::rewindPlanIDs, root, PlannedStmt::rowMarks, PlannedStmt::rtable, set_plan_references(), SS_compute_initplan_cost(), SS_finalize_plan(), PlannedStmt::stmt_len, PlannedStmt::stmt_location, PlannerGlobal::subpaths, PlannerGlobal::subplans, PlannedStmt::subplans, subquery_planner(), PlannerGlobal::transientPlan, PlannedStmt::transientPlan, PlannedStmt::unprunableRelids, UPPERREL_FINAL, and PlannedStmt::utilityStmt.
Referenced by delay_execution_planner(), pgss_planner(), and planner().
|
extern |
Definition at line 740 of file planner.c.
References aclcheck_error(), ACLCHECK_NO_PRIV, Assert, assign_special_exec_param(), bms_is_member(), bms_make_singleton(), contain_agg_clause(), contain_subplans(), contain_volatile_functions(), copyObject, CurrentMemoryContext, WindowClause::endOffset, ExecCheckOneRelPerms(), expand_grouping_sets(), expression_returns_set(), EXPRKIND_APPINFO, EXPRKIND_ARBITER_ELEM, EXPRKIND_GROUPEXPR, EXPRKIND_LIMIT, EXPRKIND_QUAL, EXPRKIND_RTFUNC, EXPRKIND_RTFUNC_LATERAL, EXPRKIND_TABLEFUNC, EXPRKIND_TABLEFUNC_LATERAL, EXPRKIND_TABLESAMPLE, EXPRKIND_TARGET, EXPRKIND_VALUES, EXPRKIND_VALUES_LATERAL, fb(), fetch_upper_rel(), flatten_group_exprs(), flatten_join_alias_vars(), flatten_simple_union_all(), get_rel_name(), getRTEPermissionInfo(), grouping_planner(), IS_OUTER_JOIN, lappend(), lfirst, lfirst_node, linitial, list_cell_number(), list_concat(), list_length(), list_make1, makeNode, Max, NIL, OBJECT_VIEW, parse(), preprocess_expression(), preprocess_function_rtes(), preprocess_qual_conditions(), preprocess_relation_rtes(), preprocess_rowmarks(), pull_up_sublinks(), pull_up_subqueries(), pull_varnos(), reduce_outer_joins(), remove_useless_result_rtes(), replace_empty_jointree(), root, rt_fetch, RTE_FUNCTION, RTE_GROUP, RTE_JOIN, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, set_cheapest(), SS_charge_for_initplans(), SS_identify_outer_params(), SS_process_ctes(), WindowClause::startOffset, transform_MERGE_to_join(), and UPPERREL_FINAL.
Referenced by make_subplan(), recurse_set_operations(), set_subquery_pathlist(), SS_process_ctes(), and standard_planner().
|
extern |
Definition at line 83 of file planner.c.
Referenced by create_distinct_paths(), create_ordered_paths(), create_ordinary_grouping_paths(), create_partial_distinct_paths(), create_window_paths(), grouping_planner(), and postprocess_setop_rel().
|
extern |
Definition at line 74 of file planner.c.
Referenced by _PG_init(), and planner().
|
extern |
Definition at line 77 of file planner.c.
Referenced by standard_planner().
|
extern |
Definition at line 80 of file planner.c.
Referenced by standard_planner().