"Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > select id , name , expensive_func(name) from > ( select id , name from tab order by c1 desc limit 15) as foo ; > is it guaranteed that the final result is order by c1 ?
The sub-select's output will be emitted in the specified order. What happens after that depends on the outer query, but if you don't have any joining or grouping then it's a reasonably safe bet that the final output will be in the same order. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster