On Mon, Jun 13, 2005 at 12:22:14 -0400,
Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I don't think the use-case has been shown that justifies doing this much
> work to ignore useless ORDER BY clauses. The examples that have come up
> in the past all suggest ignoring index columns not the other way 'round.
> Can you make a case that we need to do that part of it?
I don't think so. I don't think people are likely to order by constant
expressions except by adding them to the front to help optimization.
When I was thinking about this I was looking at what equivalences could
be used and didn't look back to see which ones would be useful in the
normal case. And I think it is a lot more likely people will leave out
columns they know not to be relevant than to include them.