Aymeric Levaux <aymeric(at)javablackbelt(dot)com> writes:
> SELECT DISTINCT tag FROM logs ORDER BY UPPER(tag);
> You get the following error message :
> for SELECT DISTINCT, ORDER BY expressions must appear in select list.
> It is weird as the order by column appears in the select.
No it doesn't. The ORDER BY expression is "UPPER(tag)" not just "tag".
regards, tom lane