1 /*------------------------------------------------------------------------- 2 * 3 * prep.h 4 * prototypes for files in optimizer/prep/ 5 * 6 * 7 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group 8 * Portions Copyright (c) 1994, Regents of the University of California 9 * 10 * src/include/optimizer/prep.h 11 * 12 *------------------------------------------------------------------------- 13 */ 14 #ifndef PREP_H 15 #define PREP_H 16 17 #include "nodes/pathnodes.h" 18 #include "nodes/plannodes.h" 19 20 21 /* 22 * prototypes for prepjointree.c 23 */ 24 extern void replace_empty_jointree(Query *parse); 25 extern void pull_up_sublinks(PlannerInfo *root); 26 extern void preprocess_function_rtes(PlannerInfo *root); 27 extern void pull_up_subqueries(PlannerInfo *root); 28 extern void flatten_simple_union_all(PlannerInfo *root); 29 extern void reduce_outer_joins(PlannerInfo *root); 30 extern void remove_useless_result_rtes(PlannerInfo *root); 31 extern Relids get_relids_in_jointree(Node *jtnode, bool include_joins); 32 extern Relids get_relids_for_join(Query *query, int joinrelid); 33 34 /* 35 * prototypes for preptlist.c 36 */ 37 extern void preprocess_targetlist(PlannerInfo *root); 38 39 extern List *extract_update_targetlist_colnos(List *tlist); 40 41 extern PlanRowMark *get_plan_rowmark(List *rowmarks, Index rtindex); 42 43 /* 44 * prototypes for prepagg.c 45 */ 46 extern void get_agg_clause_costs(PlannerInfo *root, AggSplit aggsplit, 47 AggClauseCosts *agg_costs); 48 extern void preprocess_aggrefs(PlannerInfo *root, Node *clause); 49 50 /* 51 * prototypes for prepunion.c 52 */ 53 extern RelOptInfo *plan_set_operations(PlannerInfo *root); 54 55 56 #endif /* PREP_H */ 57