Re: ORDER BY vs. volatile functions
От | Andrew Gierth |
---|---|
Тема | Re: ORDER BY vs. volatile functions |
Дата | |
Msg-id | 87d43igv4w.fsf@news-spur.riddles.org.uk обсуждение исходный текст |
Ответ на | Re: ORDER BY vs. volatile functions (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: Tom> Ron Mayer <rm_pg@cheapcomplexdevices.com> writes:>> [1] http://archives.postgresql.org/pgsql-general/2006-11/msg01544.php Tom> FWIW, the behavior has changed from the time of that discussion ---Tom> we now track sort ordering using EquivalenceClasses,which are ableTom> to distinguish different instances of textually equal() volatileTom> expressions. The particular cases ofTom> select random() from foo order by 1;Tom> select random() from foo order by random();Tom>still behave the same, but that's intentional for backwardsTom> compatibility (and because SQL99 forbids thefirst, which would meanTom> there's no way to get the behavior except via deprecated syntax). SQL99 doesn't forbid: select random() as r from foo order by r; or select r from (select random() as r from foo) as s order by r; -- Andrew (irc:RhodiumToad)
В списке pgsql-hackers по дате отправления: