| 6902 | } |
| 6903 | |
| 6904 | static TableFunctionScan * |
| 6905 | make_tablefunction(List *qptlist, List *qpqual, Plan *subplan, |
| 6906 | Index scanrelid, RangeTblFunction *function) |
| 6907 | { |
| 6908 | TableFunctionScan *node = makeNode(TableFunctionScan); |
| 6909 | Plan *plan = &node->scan.plan; |
| 6910 | |
| 6911 | copy_plan_costsize(plan, subplan); /* only care about copying size */ |
| 6912 | |
| 6913 | /* FIXME: fix costing */ |
| 6914 | plan->startup_cost = subplan->startup_cost; |
| 6915 | plan->total_cost = subplan->total_cost; |
| 6916 | plan->total_cost += 2 * plan->plan_rows; |
| 6917 | |
| 6918 | plan->qual = qpqual; |
| 6919 | plan->targetlist = qptlist; |
| 6920 | plan->righttree = NULL; |
| 6921 | |
| 6922 | /* Fill in information for the subplan */ |
| 6923 | plan->lefttree = subplan; |
| 6924 | node->scan.scanrelid = scanrelid; |
| 6925 | node->function = function; |
| 6926 | |
| 6927 | return node; |
| 6928 | } |
| 6929 | |
| 6930 | static TableFuncScan * |
| 6931 | make_tablefuncscan(List *qptlist, |
no test coverage detected