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

Поиск
Список
Период
Сортировка
От Martin Kalcher
Тема Re: [PATCH] Introduce array_shuffle() and array_sample()
Дата
Msg-id 459f6008-90bc-bc52-6f11-e68570e03ac0@aboutsource.net
обсуждение исходный текст
Ответ на Re: [PATCH] Introduce array_shuffle() and array_sample()  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: [PATCH] Introduce array_shuffle() and array_sample()  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
Am 21.07.22 um 14:25 schrieb Dean Rasheed:
> 
> I'm inclined to say that we want a new pg_global_prng_user_state that
> is updated by setseed(), and used by random(), array_shuffle(),
> array_sample(), and any other user-facing random functions we add
> later.
> 

I like the idea. How would you organize the code? I imagine some sort of 
user prng that is encapsulated in something like utils/adt/random.c and 
is guaranteed to always be seeded.

Martin



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postgres_fdw: Fix bug in checking of return value of PQsendQuery().
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [PATCH v1] eliminate duplicate code in table.c