mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Improve handling of pathtargets in planner.c.
Refactor so that the internal APIs in planner.c deal in PathTargets not targetlists, and establish a more regular structure for deriving the targets needed for successive steps. There is more that could be done here; calculating the eval costs of each successive target independently is both inefficient and wrong in detail, since we won't actually recompute values available from the input node's tlist. But it's no worse than what happened before the pathification rewrite. In any case this seems like a good starting point for considering how to handle Konstantin Knizhnik's function-evaluation-postponement patch.
This commit is contained in:
@@ -56,6 +56,9 @@ extern bool grouping_is_hashable(List *groupClause);
|
||||
|
||||
extern PathTarget *make_pathtarget_from_tlist(List *tlist);
|
||||
extern List *make_tlist_from_pathtarget(PathTarget *target);
|
||||
extern PathTarget *copy_pathtarget(PathTarget *src);
|
||||
extern void add_column_to_pathtarget(PathTarget *target,
|
||||
Expr *expr, Index sortgroupref);
|
||||
extern void apply_pathtarget_labeling_to_tlist(List *tlist, PathTarget *target);
|
||||
|
||||
/* Convenience macro to get a PathTarget with valid cost/width fields */
|
||||
|
||||
Reference in New Issue
Block a user