Re: ORDER BY vs. volatile functions
От | Tom Lane |
---|---|
Тема | Re: ORDER BY vs. volatile functions |
Дата | |
Msg-id | 23538.1258396284@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: ORDER BY vs. volatile functions (Ron Mayer <rm_pg@cheapcomplexdevices.com>) |
Ответы |
Re: ORDER BY vs. volatile functions
|
Список | pgsql-hackers |
Ron Mayer <rm_pg@cheapcomplexdevices.com> writes: > [1] http://archives.postgresql.org/pgsql-general/2006-11/msg01544.php FWIW, the behavior has changed from the time of that discussion --- we now track sort ordering using EquivalenceClasses, which are able to distinguish different instances of textually equal() volatile expressions. The particular cases ofselect random() from foo order by 1;select random() from foo order by random(); still behave the same, but that's intentional for backwards compatibility (and because SQL99 forbids the first, which would mean there's no way to get the behavior except via deprecated syntax). Beyond the case of order by/group by items being matched to tlist items, I'd generally expect that the system should act as though different textual instances of random() are evaluated separately. regards, tom lane
В списке pgsql-hackers по дате отправления: