Even if such a function existed, it would almost certainly not do what
you want in this query. Per SQL spec, the SELECT target list is
logically supposed to be evaluated before the ORDER BY and LIMIT steps, which means you'd get numbers associated with the physical ordering of the rows not their some_col ordering.
regards, tom lane
Thanks again.
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.