PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
void | transform_MERGE_to_join (Query *parse) |
void | replace_empty_jointree (Query *parse) |
void | pull_up_sublinks (PlannerInfo *root) |
void | preprocess_function_rtes (PlannerInfo *root) |
void | pull_up_subqueries (PlannerInfo *root) |
void | flatten_simple_union_all (PlannerInfo *root) |
void | reduce_outer_joins (PlannerInfo *root) |
void | remove_useless_result_rtes (PlannerInfo *root) |
Relids | get_relids_in_jointree (Node *jtnode, bool include_joins) |
Relids | get_relids_for_join (Query *query, int joinrelid) |
void | preprocess_targetlist (PlannerInfo *root) |
List * | extract_update_targetlist_colnos (List *tlist) |
PlanRowMark * | get_plan_rowmark (List *rowmarks, Index rtindex) |
void | get_agg_clause_costs (PlannerInfo *root, AggSplit aggsplit, AggClauseCosts *agg_costs) |
void | preprocess_aggrefs (PlannerInfo *root, Node *clause) |
RelOptInfo * | plan_set_operations (PlannerInfo *root) |
Definition at line 323 of file preptlist.c.
References lappend_int(), lfirst, NIL, TargetEntry::resjunk, and TargetEntry::resno.
Referenced by make_modifytable(), and preprocess_targetlist().
void flatten_simple_union_all | ( | PlannerInfo * | root | ) |
Definition at line 2557 of file prepjointree.c.
References Assert(), castNode, SetOperationStmt::colTypes, copyObject, PlannerInfo::hasRecursion, RangeTblEntry::inh, is_simple_union_all_recurse(), IsA, lappend(), SetOperationStmt::larg, list_length(), list_make1, makeNode, NIL, parse(), PlannerInfo::parse, pull_up_union_leaf_queries(), rt_fetch, RTE_SUBQUERY, RangeTblEntry::rtekind, and RangeTblRef::rtindex.
Referenced by subquery_planner().
void get_agg_clause_costs | ( | PlannerInfo * | root, |
AggSplit | aggsplit, | ||
AggClauseCosts * | agg_costs | ||
) |
Definition at line 538 of file prepagg.c.
References add_function_cost(), Aggref::aggdirectargs, AggTransInfo::aggfilter, PlannerInfo::agginfos, PlannerInfo::aggtransinfos, AggTransInfo::aggtransspace, AggTransInfo::aggtranstype, AggTransInfo::aggtranstypmod, ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_SMALL_INITSIZE, AggTransInfo::args, AggTransInfo::combinefn_oid, cost_qual_eval_node(), AggTransInfo::deserialfn_oid, DO_AGGSPLIT_COMBINE, DO_AGGSPLIT_DESERIALIZE, DO_AGGSPLIT_SERIALIZE, DO_AGGSPLIT_SKIPFINAL, AggClauseCosts::finalCost, AggInfo::finalfn_oid, get_typavgwidth(), lfirst, MAXALIGN, OidIsValid, QualCost::per_tuple, AggInfo::representative_aggref, AggTransInfo::serialfn_oid, QualCost::startup, AggClauseCosts::transCost, AggTransInfo::transfn_oid, AggClauseCosts::transitionSpace, and AggTransInfo::transtypeByVal.
Referenced by create_grouping_paths(), create_partial_grouping_paths(), and estimate_path_cost_size().
PlanRowMark* get_plan_rowmark | ( | List * | rowmarks, |
Index | rtindex | ||
) |
Definition at line 487 of file preptlist.c.
References lfirst, and PlanRowMark::rti.
Referenced by check_index_predicates(), deparseLockingClause(), and expand_inherited_rtentry().
Definition at line 3674 of file prepjointree.c.
References elog(), ERROR, find_jointree_node_for_rel(), get_relids_in_jointree(), and Query::jointree.
Referenced by alias_relid_set().
Definition at line 3630 of file prepjointree.c.
References bms_add_member(), bms_join(), bms_make_singleton(), elog(), ERROR, FromExpr::fromlist, IsA, j, lfirst, and nodeTag.
Referenced by distribute_qual_to_rels(), find_dependent_phvs_in_jointree(), get_relids_for_join(), is_simple_subquery(), preprocess_rowmarks(), process_implied_equality(), pull_up_simple_subquery(), and remove_result_refs().
RelOptInfo* plan_set_operations | ( | PlannerInfo * | root | ) |
Definition at line 103 of file prepunion.c.
References Assert(), castNode, PlannerInfo::ec_merging_done, PlannerInfo::eq_classes, generate_recursion_path(), PlannerInfo::hasRecursion, IsA, SetOperationStmt::larg, NIL, parse(), PlannerInfo::parse, PlannerInfo::processed_tlist, recurse_set_operations(), setup_simple_rel_arrays(), PlannerInfo::simple_rte_array, RangeTblEntry::subquery, and Query::targetList.
Referenced by grouping_planner().
void preprocess_aggrefs | ( | PlannerInfo * | root, |
Node * | clause | ||
) |
Definition at line 111 of file prepagg.c.
References preprocess_aggrefs_walker().
Referenced by grouping_planner().
void preprocess_function_rtes | ( | PlannerInfo * | root | ) |
Definition at line 719 of file prepjointree.c.
References eval_const_expressions(), RangeTblEntry::funcordinality, RangeTblEntry::functions, inline_set_returning_function(), lfirst, NIL, PlannerInfo::parse, Query::rtable, RTE_FUNCTION, RTE_SUBQUERY, RangeTblEntry::rtekind, RangeTblEntry::security_barrier, and RangeTblEntry::subquery.
Referenced by pull_up_simple_subquery(), and subquery_planner().
void preprocess_targetlist | ( | PlannerInfo * | root | ) |
Definition at line 62 of file preptlist.c.
References generate_unaccent_rules::action, add_row_identity_columns(), PlanRowMark::allMarkTypes, Assert(), CMD_DELETE, CMD_INSERT, CMD_MERGE, CMD_SELECT, CMD_UPDATE, elog(), ERROR, expand_insert_targetlist(), extract_update_targetlist_colnos(), RangeTblEntry::inh, InvalidOid, IsA, PlanRowMark::isParent, lappend(), lfirst, list_concat_copy(), list_free(), list_length(), makeTargetEntry(), makeVar(), makeWholeRowVar(), NoLock, parse(), PlannerInfo::parse, PlannerInfo::processed_tlist, PlanRowMark::prti, pstrdup(), pull_var_clause(), PVC_INCLUDE_PLACEHOLDERS, PVC_RECURSE_AGGREGATES, PVC_RECURSE_WINDOWFUNCS, RangeTblEntry::relid, ROW_MARK_COPY, PlanRowMark::rowmarkId, PlannerInfo::rowMarks, rt_fetch, RTE_RELATION, RangeTblEntry::rtekind, PlanRowMark::rti, SelfItemPointerAttributeNumber, snprintf, table_close(), table_open(), TableOidAttributeNumber, tlist_member(), PlannerInfo::update_colnos, and Var::varno.
Referenced by grouping_planner().
void pull_up_sublinks | ( | PlannerInfo * | root | ) |
Definition at line 288 of file prepjointree.c.
References IsA, Query::jointree, list_make1, makeFromExpr(), PlannerInfo::parse, and pull_up_sublinks_jointree_recurse().
Referenced by pull_up_simple_subquery(), and subquery_planner().
void pull_up_subqueries | ( | PlannerInfo * | root | ) |
Definition at line 760 of file prepjointree.c.
References Assert(), IsA, Query::jointree, PlannerInfo::parse, and pull_up_subqueries_recurse().
Referenced by pull_up_simple_subquery(), and subquery_planner().
void reduce_outer_joins | ( | PlannerInfo * | root | ) |
Definition at line 2675 of file prepjointree.c.
References elog(), ERROR, Query::jointree, NIL, PlannerInfo::parse, reduce_outer_joins_pass1(), and reduce_outer_joins_pass2().
Referenced by subquery_planner().
void remove_useless_result_rtes | ( | PlannerInfo * | root | ) |
Definition at line 3088 of file prepjointree.c.
References Assert(), foreach_delete_current, IsA, Query::jointree, lfirst, PlannerInfo::parse, remove_useless_results_recurse(), PlannerInfo::rowMarks, rt_fetch, Query::rtable, RTE_RESULT, and PlanRowMark::rti.
Referenced by subquery_planner().
void replace_empty_jointree | ( | Query * | parse | ) |
Definition at line 230 of file prepjointree.c.
References RangeTblEntry::eref, lappend(), list_length(), list_make1, makeAlias(), makeNode, NIL, parse(), RTE_RESULT, RangeTblEntry::rtekind, and RangeTblRef::rtindex.
Referenced by convert_EXISTS_sublink_to_join(), pull_up_simple_subquery(), and subquery_planner().
void transform_MERGE_to_join | ( | Query * | parse | ) |
Definition at line 140 of file prepjointree.c.
References RangeTblEntry::alias, JoinExpr::alias, RangeTblEntry::checkAsUser, CMD_MERGE, RangeTblEntry::eref, RangeTblEntry::extraUpdatedCols, RangeTblEntry::inFromCl, RangeTblEntry::inh, RangeTblEntry::insertedCols, InvalidOid, JoinExpr::isNatural, JOIN_INNER, JOIN_RIGHT, RangeTblEntry::join_using_alias, JoinExpr::join_using_alias, RangeTblEntry::joinaliasvars, RangeTblEntry::joinleftcols, RangeTblEntry::joinmergedcols, RangeTblEntry::joinrightcols, RangeTblEntry::jointype, JoinExpr::jointype, lappend(), JoinExpr::larg, RangeTblEntry::lateral, linitial, list_length(), list_make1, makeAlias(), makeNode, NIL, parse(), JoinExpr::quals, JoinExpr::rarg, RangeTblEntry::requiredPerms, RTE_JOIN, RangeTblEntry::rtekind, JoinExpr::rtindex, RangeTblEntry::securityQuals, RangeTblEntry::selectedCols, RangeTblEntry::updatedCols, and JoinExpr::usingClause.
Referenced by subquery_planner().