Re: [PATCH] Introduce array_shuffle() and array_sample() - Mailing list pgsql-hackers

From Martin Kalcher
Subject Re: [PATCH] Introduce array_shuffle() and array_sample()
Date
Msg-id 9cd0925c-9839-a136-c21d-87de9e8a3aa4@aboutsource.net
Whole thread Raw
In response to Re: [PATCH] Introduce array_shuffle() and array_sample()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Introduce array_shuffle() and array_sample()
List pgsql-hackers
Am 26.09.22 um 22:16 schrieb Tom Lane:
> 
> 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?

Martin



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: longfin and tamandua aren't too happy but I'm not sure why
Next
From: "Drouvot, Bertrand"
Date:
Subject: Re: SYSTEM_USER reserved word implementation