Re: BUG #6607: Strange select behavior
От
Kevin Grittner
Тема
Re: BUG #6607: Strange select behavior
Дата
Msg-id
4F959339020000250004725A@gw.wicourts.gov
Ответ на
Re: BUG #6607: Strange select behavior (Александр Шепляков)
Список
Дерево обсуждения
BUG #6607: Strange select behavior suvisor.root@gmail.com
Re: BUG #6607: Strange select behavior "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: BUG #6607: Strange select behavior Александр Шепляков<suvisor.root@gmail.com>
Re: BUG #6607: Strange select behavior "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
********* ******** wrote: > Kevin Grittner *******: =20 >> what you have written will scan the entire table and give each >> row a 1 in 100000 chance of being selected. >> > Hmm, is this because random() marked as volatile (and would be > called for every row)? Ups, I not taken this into account... =20 The VOLATILE marker *guarantees* that random() will be run for every row, but even with an immutable function you would be taking your chances on how it might run, with the way it was coded. The semantics are made unambiguous (I think) by making it a subquery in the FROM clause. =20 -Kevin
В списке pgsql-bugs по дате отправления
От: biju.george@ust-global.com
Дата: