Re: array_random
От | Dean Rasheed |
---|---|
Тема | Re: array_random |
Дата | |
Msg-id | CAEZATCU8s3M2R6LALz6aZL_4bVSoDk_zwZ52JjM=t6dXSJCh3g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: array_random (Aleksander Alekseev <aleksander@tigerdata.com>) |
Список | pgsql-hackers |
On Tue, 8 Jul 2025 at 15:26, Aleksander Alekseev <aleksander@tigerdata.com> wrote: > > The proposed function seems to do two things at a time - generating > random values and transforming them into an array of desired > dimensions. Generally we try to avoid such interfaces. Can you think > of something like array_transform() / array_reshape() that takes an > arbitrary single-dimension array and modifies it? That's a good point. Arguably, creating a simple 1-D array of random values is trivial enough to leave to users, and there isn't sufficient demand to justify creating core functions for it. OTOH, creating multi-dimensional arrays (of any values, not just random) is harder. Perhaps there is an argument for in-core functions to make that easier, though I'm not sure how many people actually use multi-dimensional arrays. In any case, that seems like a separate discussion for a new thread, if there's demand. Regards, Dean
В списке pgsql-hackers по дате отправления: