Each expression can be the name or ordinal number of an output column (SELECT list item), or it can be an arbitrary expression formed from input-column values.
followed closely by:

From: pgsql-gen...@postgresql.org [mailto:pgsql-gen...@postgresql.org] On Behalf Of Ken Tanzer
Sent: Thursday, October 11, 2012 4:49 PM
To: pgsql-...@postgresql.org
Subject: [GENERAL] non-integer constant in ORDER BY: why exactly, and documentation?
I would categorize this under “help people avoid shooting themselves in the foot”. A possible situation is that the user meant to use double-quotes to specify an identifier but instead used single quotes. Since a literal constant would not impact the sort order the planner should either discard it silently or throw an exception. The exception is preferred since the presence of a constant literal likely means whatever generated the query is broken and should be fixed.
The documentation tweak probably is overkill given the rarity of the issue and the fact the system generates an appropriate error message when it does occur.
David J.