Re: [PATCH] Introduce array_shuffle() and array_sample()

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [PATCH] Introduce array_shuffle() and array_sample()
Дата
Msg-id a81b3160-bb4-8b9e-8f3f-ff45c88fb3a3@mines-paristech.fr
обсуждение исходный текст
Ответ на Re: [PATCH] Introduce array_shuffle() and array_sample()  (Martin Kalcher <martin.kalcher@aboutsource.net>)
Ответы Re: [PATCH] Introduce array_shuffle() and array_sample()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>> With our current PRNG infrastructure it doesn't cost much to have
>> a separate PRNG for every purpose.  I don't object to having
>> array_shuffle() and array_sample() share one PRNG, but I don't
>> think it should go much further than that.
>
> Thanks for your thoughts, Tom. I have a couple of questions. Should we 
> introduce a new seed function for the new PRNG state, used by array_shuffle() 
> and array_sample()? What would be a good name? Or should those functions use 
> pg_global_prng_state? Is it safe to assume, that pg_global_prng_state is 
> seeded?

I'd suggest to use the existing global state. The global state should be 
seeded at the process start, AFAIKR.

-- 
Fabien.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: longfin and tamandua aren't too happy but I'm not sure why
Следующее
От: Robert Haas
Дата:
Сообщение: Re: longfin and tamandua aren't too happy but I'm not sure why