Re: [PATCH] random_normal function
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Paul Ramsey <pramsey@cleverelephant.ca>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2022-12-09T04:29:27Z
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
On Thu, Dec 08, 2022 at 04:44:56PM -0800, Paul Ramsey wrote: > Final tme, with fixes from cirrusci. Well, why not. Seems like you would use that a lot with PostGIS. #include <math.h> /* for ldexp() */ +#include <float.h> /* for DBL_EPSILON */ And be careful with the order here. +static void +drandom_check_default_seed() We always use (void) rather than empty parenthesis sets. I would not leave that unchecked, so I think that you should add something in ramdom.sql. Or would you prefer switching some of the regression tests be switched so as they use the new normal function? (Ahem. Bonus points for a random_string() returning a bytea, based on pg_strong_random().) -- Michael