Re: [HACKERS] EquivalenceClasses vs volatile functions

2007-11-06 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > What if the equivalence class is in more than one place in the ORDER BY? That's not a problem. ORDER BY 1,1 is not different from ORDER BY 1, even if the referenced expression is volatile, because the secondary sort key is useless anyway. > And what w

Re: [HACKERS] EquivalenceClasses vs volatile functions

2007-11-06 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > select random() as a, random() as b from foo order by b, a; > > And it definitely seems the wrong thing for the last one. Ouch. > What I'm thinking of doing is adding a field to EquivalenceClass that > carries the ressortgroupref of the originating