Fabien COELHO <coe...@cri.ensmp.fr> writes:
>> 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.

It is seeded at process start, yes.  If you don't feel a need for
user control over the sequence used by these functions, then using
pg_global_prng_state is fine.  (Basically the point to be made
here is that we need to keep a tight rein on what can be affected
by setseed().)

                        regards, tom lane


Reply via email to