I wrote: > ... The code to select the > right child path would be approximately like get_cheapest_fractional_path, > except that you need to restrict it to paths with the right sort order. Duh, I forgot about get_cheapest_fractional_path_for_pathkeys(). regards, tom lane