On Mon, Nov 1, 2010 at 8:16 PM, Tom Lane t...@sss.pgh.pa.us wrote:
This will make the min/max optimization code more visible to the rest of
the planner in a couple of ways: aside from being called at two places
not one, it will have some intermediate state that'll have to be kept in
Now that we have MergeAppend in place, it strikes me that the current
support for implementing MIN() and MAX() via indexscan+LIMIT subplans
could be generalized to work on inheritance trees: a MergeAppend
plan plus LIMIT would just about do it.
However, extending the existing implementation in