|
| 1 | +#ifndefRUNTIME_INSERT_H |
| 2 | +#defineRUNTIME_INSERT_H |
| 3 | + |
| 4 | +#include"postgres.h" |
| 5 | +#include"optimizer/paths.h" |
| 6 | +#include"optimizer/pathnode.h" |
| 7 | + |
| 8 | +#include"pathman.h" |
| 9 | +#include"nodes_common.h" |
| 10 | + |
| 11 | + |
| 12 | +typedefstruct |
| 13 | +{ |
| 14 | +CustomPathcpath; |
| 15 | +}RuntimeInsertPath; |
| 16 | + |
| 17 | +typedefstruct |
| 18 | +{ |
| 19 | +CustomScanStatecss; |
| 20 | +}RuntimeInsertState; |
| 21 | + |
| 22 | +externboolpg_pathman_enable_runtime_insert; |
| 23 | + |
| 24 | +externCustomScanMethodsruntime_insert_plan_methods; |
| 25 | +externCustomExecMethodsruntime_insert_exec_methods; |
| 26 | + |
| 27 | +Path*create_runtimeinsert_path(PlannerInfo*root,AppendPath*inner_append, |
| 28 | +ParamPathInfo*param_info, |
| 29 | +doublesel); |
| 30 | + |
| 31 | +Plan*create_runtimeinsert_plan(PlannerInfo*root,RelOptInfo*rel, |
| 32 | +CustomPath*best_path,List*tlist, |
| 33 | +List*clauses,List*custom_plans); |
| 34 | + |
| 35 | +Node*runtimeinsert_create_scan_state(CustomScan*node); |
| 36 | + |
| 37 | +voidruntimeinsert_begin(CustomScanState*node,EState*estate,inteflags); |
| 38 | + |
| 39 | +TupleTableSlot*runtimeappend_exec(CustomScanState*node); |
| 40 | + |
| 41 | +voidruntimeinsert_end(CustomScanState*node); |
| 42 | + |
| 43 | +voidruntimeinsert_rescan(CustomScanState*node); |
| 44 | + |
| 45 | +voidruntimeinsert_explain(CustomScanState*node,List*ancestors,ExplainState*es); |
| 46 | + |
| 47 | +#endif |