Constant expressions that appear in ORDER BY, GROUP BY, DISTINCT ON
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 15 Apr 2001 03:14:18 +0000 (03:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 15 Apr 2001 03:14:18 +0000 (03:14 +0000)
commita43a39b4059a8fae2c33884988c174644d084431
treee4a4f7134651ce6b2f5798b8deed9261cdbb7978
parenta9afe6a345b441df40431c1553e96a0552a153af
Constant expressions that appear in ORDER BY, GROUP BY, DISTINCT ON
lists should be reverse-compiled into targetlist index numbers, because
that's the only interpretation the parser allows for a constant in these
clauses.  (Ergo, the only way they could have gotten into the list in
the first place is to have come from the targetlist; so this should always
work.)  Per problem report from Peter E.
src/backend/utils/adt/ruleutils.c