mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Phase 2 pgindent run for v12.
Switch to 2.1 version of pg_bsd_indent. This formats multiline function declarations "correctly", that is with additional lines of parameter declarations indented to match where the first line's left parenthesis is. Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
This commit is contained in:
@@ -35,18 +35,18 @@
|
||||
/* local functions */
|
||||
static bool join_is_removable(PlannerInfo *root, SpecialJoinInfo *sjinfo);
|
||||
static void remove_rel_from_query(PlannerInfo *root, int relid,
|
||||
Relids joinrelids);
|
||||
Relids joinrelids);
|
||||
static List *remove_rel_from_joinlist(List *joinlist, int relid, int *nremoved);
|
||||
static bool rel_supports_distinctness(PlannerInfo *root, RelOptInfo *rel);
|
||||
static bool rel_is_distinct_for(PlannerInfo *root, RelOptInfo *rel,
|
||||
List *clause_list);
|
||||
List *clause_list);
|
||||
static Oid distinct_col_search(int colno, List *colnos, List *opids);
|
||||
static bool is_innerrel_unique_for(PlannerInfo *root,
|
||||
Relids joinrelids,
|
||||
Relids outerrelids,
|
||||
RelOptInfo *innerrel,
|
||||
JoinType jointype,
|
||||
List *restrictlist);
|
||||
Relids joinrelids,
|
||||
Relids outerrelids,
|
||||
RelOptInfo *innerrel,
|
||||
JoinType jointype,
|
||||
List *restrictlist);
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -72,223 +72,223 @@
|
||||
|
||||
|
||||
static Plan *create_plan_recurse(PlannerInfo *root, Path *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static Plan *create_scan_plan(PlannerInfo *root, Path *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static List *build_path_tlist(PlannerInfo *root, Path *path);
|
||||
static bool use_physical_tlist(PlannerInfo *root, Path *path, int flags);
|
||||
static List *get_gating_quals(PlannerInfo *root, List *quals);
|
||||
static Plan *create_gating_plan(PlannerInfo *root, Path *path, Plan *plan,
|
||||
List *gating_quals);
|
||||
List *gating_quals);
|
||||
static Plan *create_join_plan(PlannerInfo *root, JoinPath *best_path);
|
||||
static Plan *create_append_plan(PlannerInfo *root, AppendPath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static Plan *create_merge_append_plan(PlannerInfo *root, MergeAppendPath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static Result *create_group_result_plan(PlannerInfo *root,
|
||||
GroupResultPath *best_path);
|
||||
GroupResultPath *best_path);
|
||||
static ProjectSet *create_project_set_plan(PlannerInfo *root, ProjectSetPath *best_path);
|
||||
static Material *create_material_plan(PlannerInfo *root, MaterialPath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static Plan *create_unique_plan(PlannerInfo *root, UniquePath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static Gather *create_gather_plan(PlannerInfo *root, GatherPath *best_path);
|
||||
static Plan *create_projection_plan(PlannerInfo *root,
|
||||
ProjectionPath *best_path,
|
||||
int flags);
|
||||
ProjectionPath *best_path,
|
||||
int flags);
|
||||
static Plan *inject_projection_plan(Plan *subplan, List *tlist, bool parallel_safe);
|
||||
static Sort *create_sort_plan(PlannerInfo *root, SortPath *best_path, int flags);
|
||||
static Group *create_group_plan(PlannerInfo *root, GroupPath *best_path);
|
||||
static Unique *create_upper_unique_plan(PlannerInfo *root, UpperUniquePath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static Agg *create_agg_plan(PlannerInfo *root, AggPath *best_path);
|
||||
static Plan *create_groupingsets_plan(PlannerInfo *root, GroupingSetsPath *best_path);
|
||||
static Result *create_minmaxagg_plan(PlannerInfo *root, MinMaxAggPath *best_path);
|
||||
static WindowAgg *create_windowagg_plan(PlannerInfo *root, WindowAggPath *best_path);
|
||||
static SetOp *create_setop_plan(PlannerInfo *root, SetOpPath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static RecursiveUnion *create_recursiveunion_plan(PlannerInfo *root, RecursiveUnionPath *best_path);
|
||||
static LockRows *create_lockrows_plan(PlannerInfo *root, LockRowsPath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static ModifyTable *create_modifytable_plan(PlannerInfo *root, ModifyTablePath *best_path);
|
||||
static Limit *create_limit_plan(PlannerInfo *root, LimitPath *best_path,
|
||||
int flags);
|
||||
int flags);
|
||||
static SeqScan *create_seqscan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static SampleScan *create_samplescan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static Scan *create_indexscan_plan(PlannerInfo *root, IndexPath *best_path,
|
||||
List *tlist, List *scan_clauses, bool indexonly);
|
||||
List *tlist, List *scan_clauses, bool indexonly);
|
||||
static BitmapHeapScan *create_bitmap_scan_plan(PlannerInfo *root,
|
||||
BitmapHeapPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
BitmapHeapPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
static Plan *create_bitmap_subplan(PlannerInfo *root, Path *bitmapqual,
|
||||
List **qual, List **indexqual, List **indexECs);
|
||||
List **qual, List **indexqual, List **indexECs);
|
||||
static void bitmap_subplan_mark_shared(Plan *plan);
|
||||
static TidScan *create_tidscan_plan(PlannerInfo *root, TidPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static SubqueryScan *create_subqueryscan_plan(PlannerInfo *root,
|
||||
SubqueryScanPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
SubqueryScanPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
static FunctionScan *create_functionscan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static ValuesScan *create_valuesscan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static TableFuncScan *create_tablefuncscan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static CteScan *create_ctescan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static NamedTuplestoreScan *create_namedtuplestorescan_plan(PlannerInfo *root,
|
||||
Path *best_path, List *tlist, List *scan_clauses);
|
||||
Path *best_path, List *tlist, List *scan_clauses);
|
||||
static Result *create_resultscan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static WorkTableScan *create_worktablescan_plan(PlannerInfo *root, Path *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static ForeignScan *create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
List *tlist, List *scan_clauses);
|
||||
static CustomScan *create_customscan_plan(PlannerInfo *root,
|
||||
CustomPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
CustomPath *best_path,
|
||||
List *tlist, List *scan_clauses);
|
||||
static NestLoop *create_nestloop_plan(PlannerInfo *root, NestPath *best_path);
|
||||
static MergeJoin *create_mergejoin_plan(PlannerInfo *root, MergePath *best_path);
|
||||
static HashJoin *create_hashjoin_plan(PlannerInfo *root, HashPath *best_path);
|
||||
static Node *replace_nestloop_params(PlannerInfo *root, Node *expr);
|
||||
static Node *replace_nestloop_params_mutator(Node *node, PlannerInfo *root);
|
||||
static void fix_indexqual_references(PlannerInfo *root, IndexPath *index_path,
|
||||
List **stripped_indexquals_p,
|
||||
List **fixed_indexquals_p);
|
||||
List **stripped_indexquals_p,
|
||||
List **fixed_indexquals_p);
|
||||
static List *fix_indexorderby_references(PlannerInfo *root, IndexPath *index_path);
|
||||
static Node *fix_indexqual_clause(PlannerInfo *root,
|
||||
IndexOptInfo *index, int indexcol,
|
||||
Node *clause, List *indexcolnos);
|
||||
IndexOptInfo *index, int indexcol,
|
||||
Node *clause, List *indexcolnos);
|
||||
static Node *fix_indexqual_operand(Node *node, IndexOptInfo *index, int indexcol);
|
||||
static List *get_switched_clauses(List *clauses, Relids outerrelids);
|
||||
static List *order_qual_clauses(PlannerInfo *root, List *clauses);
|
||||
static void copy_generic_path_info(Plan *dest, Path *src);
|
||||
static void copy_plan_costsize(Plan *dest, Plan *src);
|
||||
static void label_sort_with_costsize(PlannerInfo *root, Sort *plan,
|
||||
double limit_tuples);
|
||||
double limit_tuples);
|
||||
static SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid);
|
||||
static SampleScan *make_samplescan(List *qptlist, List *qpqual, Index scanrelid,
|
||||
TableSampleClause *tsc);
|
||||
TableSampleClause *tsc);
|
||||
static IndexScan *make_indexscan(List *qptlist, List *qpqual, Index scanrelid,
|
||||
Oid indexid, List *indexqual, List *indexqualorig,
|
||||
List *indexorderby, List *indexorderbyorig,
|
||||
List *indexorderbyops,
|
||||
ScanDirection indexscandir);
|
||||
Oid indexid, List *indexqual, List *indexqualorig,
|
||||
List *indexorderby, List *indexorderbyorig,
|
||||
List *indexorderbyops,
|
||||
ScanDirection indexscandir);
|
||||
static IndexOnlyScan *make_indexonlyscan(List *qptlist, List *qpqual,
|
||||
Index scanrelid, Oid indexid,
|
||||
List *indexqual, List *indexorderby,
|
||||
List *indextlist,
|
||||
ScanDirection indexscandir);
|
||||
Index scanrelid, Oid indexid,
|
||||
List *indexqual, List *indexorderby,
|
||||
List *indextlist,
|
||||
ScanDirection indexscandir);
|
||||
static BitmapIndexScan *make_bitmap_indexscan(Index scanrelid, Oid indexid,
|
||||
List *indexqual,
|
||||
List *indexqualorig);
|
||||
List *indexqual,
|
||||
List *indexqualorig);
|
||||
static BitmapHeapScan *make_bitmap_heapscan(List *qptlist,
|
||||
List *qpqual,
|
||||
Plan *lefttree,
|
||||
List *bitmapqualorig,
|
||||
Index scanrelid);
|
||||
List *qpqual,
|
||||
Plan *lefttree,
|
||||
List *bitmapqualorig,
|
||||
Index scanrelid);
|
||||
static TidScan *make_tidscan(List *qptlist, List *qpqual, Index scanrelid,
|
||||
List *tidquals);
|
||||
List *tidquals);
|
||||
static SubqueryScan *make_subqueryscan(List *qptlist,
|
||||
List *qpqual,
|
||||
Index scanrelid,
|
||||
Plan *subplan);
|
||||
List *qpqual,
|
||||
Index scanrelid,
|
||||
Plan *subplan);
|
||||
static FunctionScan *make_functionscan(List *qptlist, List *qpqual,
|
||||
Index scanrelid, List *functions, bool funcordinality);
|
||||
Index scanrelid, List *functions, bool funcordinality);
|
||||
static ValuesScan *make_valuesscan(List *qptlist, List *qpqual,
|
||||
Index scanrelid, List *values_lists);
|
||||
Index scanrelid, List *values_lists);
|
||||
static TableFuncScan *make_tablefuncscan(List *qptlist, List *qpqual,
|
||||
Index scanrelid, TableFunc *tablefunc);
|
||||
Index scanrelid, TableFunc *tablefunc);
|
||||
static CteScan *make_ctescan(List *qptlist, List *qpqual,
|
||||
Index scanrelid, int ctePlanId, int cteParam);
|
||||
Index scanrelid, int ctePlanId, int cteParam);
|
||||
static NamedTuplestoreScan *make_namedtuplestorescan(List *qptlist, List *qpqual,
|
||||
Index scanrelid, char *enrname);
|
||||
Index scanrelid, char *enrname);
|
||||
static WorkTableScan *make_worktablescan(List *qptlist, List *qpqual,
|
||||
Index scanrelid, int wtParam);
|
||||
Index scanrelid, int wtParam);
|
||||
static RecursiveUnion *make_recursive_union(List *tlist,
|
||||
Plan *lefttree,
|
||||
Plan *righttree,
|
||||
int wtParam,
|
||||
List *distinctList,
|
||||
long numGroups);
|
||||
Plan *lefttree,
|
||||
Plan *righttree,
|
||||
int wtParam,
|
||||
List *distinctList,
|
||||
long numGroups);
|
||||
static BitmapAnd *make_bitmap_and(List *bitmapplans);
|
||||
static BitmapOr *make_bitmap_or(List *bitmapplans);
|
||||
static NestLoop *make_nestloop(List *tlist,
|
||||
List *joinclauses, List *otherclauses, List *nestParams,
|
||||
Plan *lefttree, Plan *righttree,
|
||||
JoinType jointype, bool inner_unique);
|
||||
List *joinclauses, List *otherclauses, List *nestParams,
|
||||
Plan *lefttree, Plan *righttree,
|
||||
JoinType jointype, bool inner_unique);
|
||||
static HashJoin *make_hashjoin(List *tlist,
|
||||
List *joinclauses, List *otherclauses,
|
||||
List *hashclauses,
|
||||
Plan *lefttree, Plan *righttree,
|
||||
JoinType jointype, bool inner_unique);
|
||||
List *joinclauses, List *otherclauses,
|
||||
List *hashclauses,
|
||||
Plan *lefttree, Plan *righttree,
|
||||
JoinType jointype, bool inner_unique);
|
||||
static Hash *make_hash(Plan *lefttree,
|
||||
Oid skewTable,
|
||||
AttrNumber skewColumn,
|
||||
bool skewInherit);
|
||||
Oid skewTable,
|
||||
AttrNumber skewColumn,
|
||||
bool skewInherit);
|
||||
static MergeJoin *make_mergejoin(List *tlist,
|
||||
List *joinclauses, List *otherclauses,
|
||||
List *mergeclauses,
|
||||
Oid *mergefamilies,
|
||||
Oid *mergecollations,
|
||||
int *mergestrategies,
|
||||
bool *mergenullsfirst,
|
||||
Plan *lefttree, Plan *righttree,
|
||||
JoinType jointype, bool inner_unique,
|
||||
bool skip_mark_restore);
|
||||
List *joinclauses, List *otherclauses,
|
||||
List *mergeclauses,
|
||||
Oid *mergefamilies,
|
||||
Oid *mergecollations,
|
||||
int *mergestrategies,
|
||||
bool *mergenullsfirst,
|
||||
Plan *lefttree, Plan *righttree,
|
||||
JoinType jointype, bool inner_unique,
|
||||
bool skip_mark_restore);
|
||||
static Sort *make_sort(Plan *lefttree, int numCols,
|
||||
AttrNumber *sortColIdx, Oid *sortOperators,
|
||||
Oid *collations, bool *nullsFirst);
|
||||
AttrNumber *sortColIdx, Oid *sortOperators,
|
||||
Oid *collations, bool *nullsFirst);
|
||||
static Plan *prepare_sort_from_pathkeys(Plan *lefttree, List *pathkeys,
|
||||
Relids relids,
|
||||
const AttrNumber *reqColIdx,
|
||||
bool adjust_tlist_in_place,
|
||||
int *p_numsortkeys,
|
||||
AttrNumber **p_sortColIdx,
|
||||
Oid **p_sortOperators,
|
||||
Oid **p_collations,
|
||||
bool **p_nullsFirst);
|
||||
Relids relids,
|
||||
const AttrNumber *reqColIdx,
|
||||
bool adjust_tlist_in_place,
|
||||
int *p_numsortkeys,
|
||||
AttrNumber **p_sortColIdx,
|
||||
Oid **p_sortOperators,
|
||||
Oid **p_collations,
|
||||
bool **p_nullsFirst);
|
||||
static EquivalenceMember *find_ec_member_for_tle(EquivalenceClass *ec,
|
||||
TargetEntry *tle,
|
||||
Relids relids);
|
||||
TargetEntry *tle,
|
||||
Relids relids);
|
||||
static Sort *make_sort_from_pathkeys(Plan *lefttree, List *pathkeys,
|
||||
Relids relids);
|
||||
Relids relids);
|
||||
static Sort *make_sort_from_groupcols(List *groupcls,
|
||||
AttrNumber *grpColIdx,
|
||||
Plan *lefttree);
|
||||
AttrNumber *grpColIdx,
|
||||
Plan *lefttree);
|
||||
static Material *make_material(Plan *lefttree);
|
||||
static WindowAgg *make_windowagg(List *tlist, Index winref,
|
||||
int partNumCols, AttrNumber *partColIdx, Oid *partOperators, Oid *partCollations,
|
||||
int ordNumCols, AttrNumber *ordColIdx, Oid *ordOperators, Oid *ordCollations,
|
||||
int frameOptions, Node *startOffset, Node *endOffset,
|
||||
Oid startInRangeFunc, Oid endInRangeFunc,
|
||||
Oid inRangeColl, bool inRangeAsc, bool inRangeNullsFirst,
|
||||
Plan *lefttree);
|
||||
int partNumCols, AttrNumber *partColIdx, Oid *partOperators, Oid *partCollations,
|
||||
int ordNumCols, AttrNumber *ordColIdx, Oid *ordOperators, Oid *ordCollations,
|
||||
int frameOptions, Node *startOffset, Node *endOffset,
|
||||
Oid startInRangeFunc, Oid endInRangeFunc,
|
||||
Oid inRangeColl, bool inRangeAsc, bool inRangeNullsFirst,
|
||||
Plan *lefttree);
|
||||
static Group *make_group(List *tlist, List *qual, int numGroupCols,
|
||||
AttrNumber *grpColIdx, Oid *grpOperators, Oid *grpCollations,
|
||||
Plan *lefttree);
|
||||
AttrNumber *grpColIdx, Oid *grpOperators, Oid *grpCollations,
|
||||
Plan *lefttree);
|
||||
static Unique *make_unique_from_sortclauses(Plan *lefttree, List *distinctList);
|
||||
static Unique *make_unique_from_pathkeys(Plan *lefttree,
|
||||
List *pathkeys, int numCols);
|
||||
List *pathkeys, int numCols);
|
||||
static Gather *make_gather(List *qptlist, List *qpqual,
|
||||
int nworkers, int rescan_param, bool single_copy, Plan *subplan);
|
||||
int nworkers, int rescan_param, bool single_copy, Plan *subplan);
|
||||
static SetOp *make_setop(SetOpCmd cmd, SetOpStrategy strategy, Plan *lefttree,
|
||||
List *distinctList, AttrNumber flagColIdx, int firstFlag,
|
||||
long numGroups);
|
||||
List *distinctList, AttrNumber flagColIdx, int firstFlag,
|
||||
long numGroups);
|
||||
static LockRows *make_lockrows(Plan *lefttree, List *rowMarks, int epqParam);
|
||||
static Result *make_result(List *tlist, Node *resconstantqual, Plan *subplan);
|
||||
static ProjectSet *make_project_set(List *tlist, Plan *subplan);
|
||||
static ModifyTable *make_modifytable(PlannerInfo *root,
|
||||
CmdType operation, bool canSetTag,
|
||||
Index nominalRelation, Index rootRelation,
|
||||
bool partColsUpdated,
|
||||
List *resultRelations, List *subplans, List *subroots,
|
||||
List *withCheckOptionLists, List *returningLists,
|
||||
List *rowMarks, OnConflictExpr *onconflict, int epqParam);
|
||||
CmdType operation, bool canSetTag,
|
||||
Index nominalRelation, Index rootRelation,
|
||||
bool partColsUpdated,
|
||||
List *resultRelations, List *subplans, List *subroots,
|
||||
List *withCheckOptionLists, List *returningLists,
|
||||
List *rowMarks, OnConflictExpr *onconflict, int epqParam);
|
||||
static GatherMerge *create_gather_merge_plan(PlannerInfo *root,
|
||||
GatherMergePath *best_path);
|
||||
GatherMergePath *best_path);
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -49,33 +49,33 @@ typedef struct PostponedQual
|
||||
|
||||
|
||||
static void extract_lateral_references(PlannerInfo *root, RelOptInfo *brel,
|
||||
Index rtindex);
|
||||
Index rtindex);
|
||||
static List *deconstruct_recurse(PlannerInfo *root, Node *jtnode,
|
||||
bool below_outer_join,
|
||||
Relids *qualscope, Relids *inner_join_rels,
|
||||
List **postponed_qual_list);
|
||||
bool below_outer_join,
|
||||
Relids *qualscope, Relids *inner_join_rels,
|
||||
List **postponed_qual_list);
|
||||
static void process_security_barrier_quals(PlannerInfo *root,
|
||||
int rti, Relids qualscope,
|
||||
bool below_outer_join);
|
||||
int rti, Relids qualscope,
|
||||
bool below_outer_join);
|
||||
static SpecialJoinInfo *make_outerjoininfo(PlannerInfo *root,
|
||||
Relids left_rels, Relids right_rels,
|
||||
Relids inner_join_rels,
|
||||
JoinType jointype, List *clause);
|
||||
Relids left_rels, Relids right_rels,
|
||||
Relids inner_join_rels,
|
||||
JoinType jointype, List *clause);
|
||||
static void compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause);
|
||||
static void distribute_qual_to_rels(PlannerInfo *root, Node *clause,
|
||||
bool is_deduced,
|
||||
bool below_outer_join,
|
||||
JoinType jointype,
|
||||
Index security_level,
|
||||
Relids qualscope,
|
||||
Relids ojscope,
|
||||
Relids outerjoin_nonnullable,
|
||||
Relids deduced_nullable_relids,
|
||||
List **postponed_qual_list);
|
||||
bool is_deduced,
|
||||
bool below_outer_join,
|
||||
JoinType jointype,
|
||||
Index security_level,
|
||||
Relids qualscope,
|
||||
Relids ojscope,
|
||||
Relids outerjoin_nonnullable,
|
||||
Relids deduced_nullable_relids,
|
||||
List **postponed_qual_list);
|
||||
static bool check_outerjoin_delay(PlannerInfo *root, Relids *relids_p,
|
||||
Relids *nullable_relids_p, bool is_pushed_down);
|
||||
Relids *nullable_relids_p, bool is_pushed_down);
|
||||
static bool check_equivalence_delay(PlannerInfo *root,
|
||||
RestrictInfo *restrictinfo);
|
||||
RestrictInfo *restrictinfo);
|
||||
static bool check_redundant_nullability_qual(PlannerInfo *root, Node *clause);
|
||||
static void check_mergejoinable(RestrictInfo *restrictinfo);
|
||||
static void check_hashjoinable(RestrictInfo *restrictinfo);
|
||||
|
@@ -50,7 +50,7 @@
|
||||
|
||||
static bool find_minmax_aggs_walker(Node *node, List **context);
|
||||
static bool build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo,
|
||||
Oid eqop, Oid sortop, bool nulls_first);
|
||||
Oid eqop, Oid sortop, bool nulls_first);
|
||||
static void minmax_qp_callback(PlannerInfo *root, void *extra);
|
||||
static Oid fetch_agg_sort_op(Oid aggfnoid);
|
||||
|
||||
|
@@ -132,122 +132,122 @@ static Node *preprocess_expression(PlannerInfo *root, Node *expr, int kind);
|
||||
static void preprocess_qual_conditions(PlannerInfo *root, Node *jtnode);
|
||||
static void inheritance_planner(PlannerInfo *root);
|
||||
static void grouping_planner(PlannerInfo *root, bool inheritance_update,
|
||||
double tuple_fraction);
|
||||
double tuple_fraction);
|
||||
static grouping_sets_data *preprocess_grouping_sets(PlannerInfo *root);
|
||||
static List *remap_to_groupclause_idx(List *groupClause, List *gsets,
|
||||
int *tleref_to_colnum_map);
|
||||
int *tleref_to_colnum_map);
|
||||
static void preprocess_rowmarks(PlannerInfo *root);
|
||||
static double preprocess_limit(PlannerInfo *root,
|
||||
double tuple_fraction,
|
||||
int64 *offset_est, int64 *count_est);
|
||||
double tuple_fraction,
|
||||
int64 *offset_est, int64 *count_est);
|
||||
static void remove_useless_groupby_columns(PlannerInfo *root);
|
||||
static List *preprocess_groupclause(PlannerInfo *root, List *force);
|
||||
static List *extract_rollup_sets(List *groupingSets);
|
||||
static List *reorder_grouping_sets(List *groupingSets, List *sortclause);
|
||||
static void standard_qp_callback(PlannerInfo *root, void *extra);
|
||||
static double get_number_of_groups(PlannerInfo *root,
|
||||
double path_rows,
|
||||
grouping_sets_data *gd,
|
||||
List *target_list);
|
||||
double path_rows,
|
||||
grouping_sets_data *gd,
|
||||
List *target_list);
|
||||
static RelOptInfo *create_grouping_paths(PlannerInfo *root,
|
||||
RelOptInfo *input_rel,
|
||||
PathTarget *target,
|
||||
bool target_parallel_safe,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd);
|
||||
RelOptInfo *input_rel,
|
||||
PathTarget *target,
|
||||
bool target_parallel_safe,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd);
|
||||
static bool is_degenerate_grouping(PlannerInfo *root);
|
||||
static void create_degenerate_grouping_paths(PlannerInfo *root,
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *grouped_rel);
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *grouped_rel);
|
||||
static RelOptInfo *make_grouping_rel(PlannerInfo *root, RelOptInfo *input_rel,
|
||||
PathTarget *target, bool target_parallel_safe,
|
||||
Node *havingQual);
|
||||
PathTarget *target, bool target_parallel_safe,
|
||||
Node *havingQual);
|
||||
static void create_ordinary_grouping_paths(PlannerInfo *root,
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *grouped_rel,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd,
|
||||
GroupPathExtraData *extra,
|
||||
RelOptInfo **partially_grouped_rel_p);
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *grouped_rel,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd,
|
||||
GroupPathExtraData *extra,
|
||||
RelOptInfo **partially_grouped_rel_p);
|
||||
static void consider_groupingsets_paths(PlannerInfo *root,
|
||||
RelOptInfo *grouped_rel,
|
||||
Path *path,
|
||||
bool is_sorted,
|
||||
bool can_hash,
|
||||
grouping_sets_data *gd,
|
||||
const AggClauseCosts *agg_costs,
|
||||
double dNumGroups);
|
||||
RelOptInfo *grouped_rel,
|
||||
Path *path,
|
||||
bool is_sorted,
|
||||
bool can_hash,
|
||||
grouping_sets_data *gd,
|
||||
const AggClauseCosts *agg_costs,
|
||||
double dNumGroups);
|
||||
static RelOptInfo *create_window_paths(PlannerInfo *root,
|
||||
RelOptInfo *input_rel,
|
||||
PathTarget *input_target,
|
||||
PathTarget *output_target,
|
||||
bool output_target_parallel_safe,
|
||||
WindowFuncLists *wflists,
|
||||
List *activeWindows);
|
||||
RelOptInfo *input_rel,
|
||||
PathTarget *input_target,
|
||||
PathTarget *output_target,
|
||||
bool output_target_parallel_safe,
|
||||
WindowFuncLists *wflists,
|
||||
List *activeWindows);
|
||||
static void create_one_window_path(PlannerInfo *root,
|
||||
RelOptInfo *window_rel,
|
||||
Path *path,
|
||||
PathTarget *input_target,
|
||||
PathTarget *output_target,
|
||||
WindowFuncLists *wflists,
|
||||
List *activeWindows);
|
||||
RelOptInfo *window_rel,
|
||||
Path *path,
|
||||
PathTarget *input_target,
|
||||
PathTarget *output_target,
|
||||
WindowFuncLists *wflists,
|
||||
List *activeWindows);
|
||||
static RelOptInfo *create_distinct_paths(PlannerInfo *root,
|
||||
RelOptInfo *input_rel);
|
||||
RelOptInfo *input_rel);
|
||||
static RelOptInfo *create_ordered_paths(PlannerInfo *root,
|
||||
RelOptInfo *input_rel,
|
||||
PathTarget *target,
|
||||
bool target_parallel_safe,
|
||||
double limit_tuples);
|
||||
RelOptInfo *input_rel,
|
||||
PathTarget *target,
|
||||
bool target_parallel_safe,
|
||||
double limit_tuples);
|
||||
static PathTarget *make_group_input_target(PlannerInfo *root,
|
||||
PathTarget *final_target);
|
||||
PathTarget *final_target);
|
||||
static PathTarget *make_partial_grouping_target(PlannerInfo *root,
|
||||
PathTarget *grouping_target,
|
||||
Node *havingQual);
|
||||
PathTarget *grouping_target,
|
||||
Node *havingQual);
|
||||
static List *postprocess_setop_tlist(List *new_tlist, List *orig_tlist);
|
||||
static List *select_active_windows(PlannerInfo *root, WindowFuncLists *wflists);
|
||||
static PathTarget *make_window_input_target(PlannerInfo *root,
|
||||
PathTarget *final_target,
|
||||
List *activeWindows);
|
||||
PathTarget *final_target,
|
||||
List *activeWindows);
|
||||
static List *make_pathkeys_for_window(PlannerInfo *root, WindowClause *wc,
|
||||
List *tlist);
|
||||
List *tlist);
|
||||
static PathTarget *make_sort_input_target(PlannerInfo *root,
|
||||
PathTarget *final_target,
|
||||
bool *have_postponed_srfs);
|
||||
PathTarget *final_target,
|
||||
bool *have_postponed_srfs);
|
||||
static void adjust_paths_for_srfs(PlannerInfo *root, RelOptInfo *rel,
|
||||
List *targets, List *targets_contain_srfs);
|
||||
List *targets, List *targets_contain_srfs);
|
||||
static void add_paths_to_grouping_rel(PlannerInfo *root, RelOptInfo *input_rel,
|
||||
RelOptInfo *grouped_rel,
|
||||
RelOptInfo *partially_grouped_rel,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd,
|
||||
double dNumGroups,
|
||||
GroupPathExtraData *extra);
|
||||
RelOptInfo *grouped_rel,
|
||||
RelOptInfo *partially_grouped_rel,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd,
|
||||
double dNumGroups,
|
||||
GroupPathExtraData *extra);
|
||||
static RelOptInfo *create_partial_grouping_paths(PlannerInfo *root,
|
||||
RelOptInfo *grouped_rel,
|
||||
RelOptInfo *input_rel,
|
||||
grouping_sets_data *gd,
|
||||
GroupPathExtraData *extra,
|
||||
bool force_rel_creation);
|
||||
RelOptInfo *grouped_rel,
|
||||
RelOptInfo *input_rel,
|
||||
grouping_sets_data *gd,
|
||||
GroupPathExtraData *extra,
|
||||
bool force_rel_creation);
|
||||
static void gather_grouping_paths(PlannerInfo *root, RelOptInfo *rel);
|
||||
static bool can_partial_agg(PlannerInfo *root,
|
||||
const AggClauseCosts *agg_costs);
|
||||
const AggClauseCosts *agg_costs);
|
||||
static void apply_scanjoin_target_to_paths(PlannerInfo *root,
|
||||
RelOptInfo *rel,
|
||||
List *scanjoin_targets,
|
||||
List *scanjoin_targets_contain_srfs,
|
||||
bool scanjoin_target_parallel_safe,
|
||||
bool tlist_same_exprs);
|
||||
RelOptInfo *rel,
|
||||
List *scanjoin_targets,
|
||||
List *scanjoin_targets_contain_srfs,
|
||||
bool scanjoin_target_parallel_safe,
|
||||
bool tlist_same_exprs);
|
||||
static void create_partitionwise_grouping_paths(PlannerInfo *root,
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *grouped_rel,
|
||||
RelOptInfo *partially_grouped_rel,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd,
|
||||
PartitionwiseAggregateType patype,
|
||||
GroupPathExtraData *extra);
|
||||
RelOptInfo *input_rel,
|
||||
RelOptInfo *grouped_rel,
|
||||
RelOptInfo *partially_grouped_rel,
|
||||
const AggClauseCosts *agg_costs,
|
||||
grouping_sets_data *gd,
|
||||
PartitionwiseAggregateType patype,
|
||||
GroupPathExtraData *extra);
|
||||
static bool group_by_has_partkey(RelOptInfo *input_rel,
|
||||
List *targetList,
|
||||
List *groupClause);
|
||||
List *targetList,
|
||||
List *groupClause);
|
||||
static int common_prefix_cmp(const void *a, const void *b);
|
||||
|
||||
|
||||
|
@@ -88,25 +88,25 @@ static bool flatten_rtes_walker(Node *node, PlannerGlobal *glob);
|
||||
static void add_rte_to_flat_rtable(PlannerGlobal *glob, RangeTblEntry *rte);
|
||||
static Plan *set_plan_refs(PlannerInfo *root, Plan *plan, int rtoffset);
|
||||
static Plan *set_indexonlyscan_references(PlannerInfo *root,
|
||||
IndexOnlyScan *plan,
|
||||
int rtoffset);
|
||||
IndexOnlyScan *plan,
|
||||
int rtoffset);
|
||||
static Plan *set_subqueryscan_references(PlannerInfo *root,
|
||||
SubqueryScan *plan,
|
||||
int rtoffset);
|
||||
SubqueryScan *plan,
|
||||
int rtoffset);
|
||||
static bool trivial_subqueryscan(SubqueryScan *plan);
|
||||
static Plan *clean_up_removed_plan_level(Plan *parent, Plan *child);
|
||||
static void set_foreignscan_references(PlannerInfo *root,
|
||||
ForeignScan *fscan,
|
||||
int rtoffset);
|
||||
ForeignScan *fscan,
|
||||
int rtoffset);
|
||||
static void set_customscan_references(PlannerInfo *root,
|
||||
CustomScan *cscan,
|
||||
int rtoffset);
|
||||
CustomScan *cscan,
|
||||
int rtoffset);
|
||||
static Plan *set_append_references(PlannerInfo *root,
|
||||
Append *aplan,
|
||||
int rtoffset);
|
||||
Append *aplan,
|
||||
int rtoffset);
|
||||
static Plan *set_mergeappend_references(PlannerInfo *root,
|
||||
MergeAppend *mplan,
|
||||
int rtoffset);
|
||||
MergeAppend *mplan,
|
||||
int rtoffset);
|
||||
static Node *fix_scan_expr(PlannerInfo *root, Node *node, int rtoffset);
|
||||
static Node *fix_scan_expr_mutator(Node *node, fix_scan_expr_context *context);
|
||||
static bool fix_scan_expr_walker(Node *node, fix_scan_expr_context *context);
|
||||
@@ -117,35 +117,35 @@ static Node *convert_combining_aggrefs(Node *node, void *context);
|
||||
static void set_dummy_tlist_references(Plan *plan, int rtoffset);
|
||||
static indexed_tlist *build_tlist_index(List *tlist);
|
||||
static Var *search_indexed_tlist_for_var(Var *var,
|
||||
indexed_tlist *itlist,
|
||||
Index newvarno,
|
||||
int rtoffset);
|
||||
indexed_tlist *itlist,
|
||||
Index newvarno,
|
||||
int rtoffset);
|
||||
static Var *search_indexed_tlist_for_non_var(Expr *node,
|
||||
indexed_tlist *itlist,
|
||||
Index newvarno);
|
||||
indexed_tlist *itlist,
|
||||
Index newvarno);
|
||||
static Var *search_indexed_tlist_for_sortgroupref(Expr *node,
|
||||
Index sortgroupref,
|
||||
indexed_tlist *itlist,
|
||||
Index newvarno);
|
||||
Index sortgroupref,
|
||||
indexed_tlist *itlist,
|
||||
Index newvarno);
|
||||
static List *fix_join_expr(PlannerInfo *root,
|
||||
List *clauses,
|
||||
indexed_tlist *outer_itlist,
|
||||
indexed_tlist *inner_itlist,
|
||||
Index acceptable_rel, int rtoffset);
|
||||
List *clauses,
|
||||
indexed_tlist *outer_itlist,
|
||||
indexed_tlist *inner_itlist,
|
||||
Index acceptable_rel, int rtoffset);
|
||||
static Node *fix_join_expr_mutator(Node *node,
|
||||
fix_join_expr_context *context);
|
||||
fix_join_expr_context *context);
|
||||
static Node *fix_upper_expr(PlannerInfo *root,
|
||||
Node *node,
|
||||
indexed_tlist *subplan_itlist,
|
||||
Index newvarno,
|
||||
int rtoffset);
|
||||
Node *node,
|
||||
indexed_tlist *subplan_itlist,
|
||||
Index newvarno,
|
||||
int rtoffset);
|
||||
static Node *fix_upper_expr_mutator(Node *node,
|
||||
fix_upper_expr_context *context);
|
||||
fix_upper_expr_context *context);
|
||||
static List *set_returning_clause_references(PlannerInfo *root,
|
||||
List *rlist,
|
||||
Plan *topplan,
|
||||
Index resultRelation,
|
||||
int rtoffset);
|
||||
List *rlist,
|
||||
Plan *topplan,
|
||||
Index resultRelation,
|
||||
int rtoffset);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
|
@@ -67,19 +67,19 @@ typedef struct inline_cte_walker_context
|
||||
|
||||
|
||||
static Node *build_subplan(PlannerInfo *root, Plan *plan, PlannerInfo *subroot,
|
||||
List *plan_params,
|
||||
SubLinkType subLinkType, int subLinkId,
|
||||
Node *testexpr, bool adjust_testexpr,
|
||||
bool unknownEqFalse);
|
||||
List *plan_params,
|
||||
SubLinkType subLinkType, int subLinkId,
|
||||
Node *testexpr, bool adjust_testexpr,
|
||||
bool unknownEqFalse);
|
||||
static List *generate_subquery_params(PlannerInfo *root, List *tlist,
|
||||
List **paramIds);
|
||||
List **paramIds);
|
||||
static List *generate_subquery_vars(PlannerInfo *root, List *tlist,
|
||||
Index varno);
|
||||
Index varno);
|
||||
static Node *convert_testexpr(PlannerInfo *root,
|
||||
Node *testexpr,
|
||||
List *subst_nodes);
|
||||
Node *testexpr,
|
||||
List *subst_nodes);
|
||||
static Node *convert_testexpr_mutator(Node *node,
|
||||
convert_testexpr_context *context);
|
||||
convert_testexpr_context *context);
|
||||
static bool subplan_is_hashable(Plan *plan);
|
||||
static bool testexpr_is_hashable(Node *testexpr);
|
||||
static bool hash_ok_operator(OpExpr *expr);
|
||||
@@ -91,15 +91,15 @@ static void inline_cte(PlannerInfo *root, CommonTableExpr *cte);
|
||||
static bool inline_cte_walker(Node *node, inline_cte_walker_context *context);
|
||||
static bool simplify_EXISTS_query(PlannerInfo *root, Query *query);
|
||||
static Query *convert_EXISTS_to_ANY(PlannerInfo *root, Query *subselect,
|
||||
Node **testexpr, List **paramIds);
|
||||
Node **testexpr, List **paramIds);
|
||||
static Node *replace_correlation_vars_mutator(Node *node, PlannerInfo *root);
|
||||
static Node *process_sublinks_mutator(Node *node,
|
||||
process_sublinks_context *context);
|
||||
process_sublinks_context *context);
|
||||
static Bitmapset *finalize_plan(PlannerInfo *root,
|
||||
Plan *plan,
|
||||
int gather_param,
|
||||
Bitmapset *valid_params,
|
||||
Bitmapset *scan_params);
|
||||
Plan *plan,
|
||||
int gather_param,
|
||||
Bitmapset *valid_params,
|
||||
Bitmapset *scan_params);
|
||||
static bool finalize_primnode(Node *node, finalize_primnode_context *context);
|
||||
static bool finalize_agg_primnode(Node *node, finalize_primnode_context *context);
|
||||
|
||||
|
Reference in New Issue
Block a user