Hi,
Looks I miss some interesting dicussions in the recent days, the pretty neat API random_array, random_array or array_random (I prefer the random_array because of the setseed stuff as Dean said). These dicussions absoluatly enrichs my API / decoument design experience. I'm still not sure if it should be put into core, I agree that random_array/array_random should be put into core if we go with this way. It looks to me that the cost of putting them into core is just it takes more OIDs in initdb, hence making catalog a bit of bigger, not sure the real matter of it. As for if we should support random_array_multidim at the first step, as a developer, I would like to try dim sutff since I have little experience on this area, It is possible that this area bring some other interesting experience for me as the things happen to me recently. > I suggest implementing the function in several steps. First implement > random_array(min, max, len). It's straightforward and IMO will provide > the most value to the majority of the users.Then we can either add an > optional argument or a random_array_multidim() function. This may doubles the OID expence, every invariants needs 3 OIDs(int, bigint, numeric). > This can be > implemented and discussed as a separate patch. This approach would be > convenient for the author and the reviewers and also will allow us to > deliver value to the users sooner. Appricated for your suggestion like this, Aleksander, I can understand your kindly intention! If no new ideas, I will defer to Dean's final decision for efficient purpose. -- Best Regards Andy Fan