Gregory Stark <stark@xxxxxxxxxxxxxxxx> writes: > "Tom Lane" <tgl@xxxxxxxxxxxxx> writes: >> Don't hold your breath though --- it'll take major planner surgery. > In this case isn't all the planner needs the pathkey list to give it a hint > that that ordering might be useful? You could maybe make that work if you were willing to speculatively re-plan the entire subquery for each potentially useful ordering. I think that would chew an unacceptable number of cycles though. The upper planner doesn't have any clue about what indexes are available in the lower query, so it would end up requesting a lot of useless re-plans. In any case the nullable-targetlist restriction causes a whole lot of other problems that this wouldn't address. I'd rather spend my time on solving the more general problem. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general