Re: Random not so random
От | Vivek Khera |
---|---|
Тема | Re: Random not so random |
Дата | |
Msg-id | x7brfg6eib.fsf@yertle.int.kciLink.com обсуждение исходный текст |
Ответ на | Re: Random not so random ("Arnau Rebassa" <arebassa@hotmail.com>) |
Ответы |
Re: Random not so random
|
Список | pgsql-general |
>>>>> "DS" == D Stimits <stimits@comcast.net> writes: DS> If it uses the same seed from the connection, then all randoms within DS> a connect that has not reconnected will use the same seed. Which means DS> the same sequence will be generated each time, which is why it is DS> pseudo-random and not random. For it to be random not just the first DS> call of a new connection, but among all calls of new connection, it DS> would have to seed it based on time at the moment of query and not at DS> the moment of connect. A pseudo-random generator using the same seed DS> will generate the same sequence. You clearly demonstrate you do not understand the purpose of a seed in a PRNG, nor how PRNG's in general work. You want to seed it once and only once per process, not every time you issue a query. And nobody said to use the same seed every time, either. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D. Khera Communications, Inc. Internet: khera@kciLink.com Rockville, MD +1-301-869-4449 x806 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
В списке pgsql-general по дате отправления: