Pavel Stehule <pavel.steh...@gmail.com> writes: > 2009/12/25 Tom Lane <t...@sss.pgh.pa.us>: >> No, because you could have more than one ORDER BY item.
> hmm - this isn't bullet-prof design :( I notice that ORDER BY 'x' draws an error at the query level but not within aggregates or window functions. I wonder if we should have the "SQL99" ORDER BY code throw an error for a simple literal ORDER BY item. There isn't any visible use for ordering by a constant, and this would catch some possible misunderstandings. For instance, it would have complained about Pavel's original example in this thread, and we could word the error message to make it clear that the system thinks that's an ORDER BY value not an aggregate argument. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers