Re: [PATCH] random_normal function
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul Ramsey <pramsey@cleverelephant.ca>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>,
Fabien COELHO <coelho@cri.ensmp.fr>,
Michael Paquier <michael@paquier.xyz>,
Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org
Date: 2023-01-09T18:52:16Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Round off random_normal() test results one more decimal place.
- 02d552c4f422 16.0 landed
-
Remove pg_regress' never-documented "ignore" feature.
- bd8d453e9b5f 16.0 landed
-
Upgrade the random.sql regression test.
- 09d517773f60 16.0 landed
-
Invent random_normal() to provide normally-distributed random numbers.
- 38d81760c4d7 16.0 landed
Attachments
- improve-random-tests-1.patch (text/x-diff) patch
I wrote: > Hmm ... it occurred to me to try the same check on the existing > random() tests (attached), and darn if they don't fail even more > often, usually within 50K iterations. So maybe we should rethink > that whole thing. I pushed Paul's patch with the previously-discussed tests, but the more I look at random.sql the less I like it. I propose that we nuke the existing tests from orbit and replace with something more or less as attached. This is faster than what we have, removes the unnecessary dependency on the "onek" table, and I believe it to be a substantially more thorough test of the random functions' properties. (We could probably go further than this, like trying to verify distribution properties. But it's been too long since college statistics for me to want to write such tests myself, and I'm not real sure we need them.) BTW, if this does bring the probability of failure down to the one-in-a-billion range, I think we could also nuke the whole "ignore:" business, simplifying pg_regress and allowing the random test to be run in parallel with others. regards, tom lane