Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> writes:
> Can we change the query_planner() to return both the paths (presorted and
> unsorted) irrespective of the cost of presorted path, and let
> grouping_planner() (or any caller of query_planner()) handle which of them
> to pick up?
That's exactly the result this change would have, since all the potential
Paths are attached to the top-level RelOptInfo.
regards, tom lane