Re: [PATCH] random_normal function

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "David E. Wheeler" <david@justatheory.com>, Andrey Lepikhov <a.lepikhov@postgrespro.ru>, Dean Rasheed <dean.a.rasheed@gmail.com>, Fabien COELHO <coelho@cri.ensmp.fr>, Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org, Paul Ramsey <pramsey@cleverelephant.ca>
Date: 2025-10-06T04:30:01Z
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 →
  1. Round off random_normal() test results one more decimal place.

  2. Remove pg_regress' never-documented "ignore" feature.

  3. Upgrade the random.sql regression test.

  4. Invent random_normal() to provide normally-distributed random numbers.

On Sat, Oct 04, 2025 at 02:07:45PM -0400, Tom Lane wrote:
> Actually, there is a *ton* of obsolete information on that page:
> there's no serial_schedule file anymore, and we don't have
> dynamically-generated test files anymore (input/output subdirectories)
> and therefore there's no substituted variables.  The age of the whole
> thing can be dated by its references to CVS :-(
> 
> Maybe we should indeed try to replace it with something in the main
> docs, which are a bit more likely to get maintained.  There is an
> existing chapter "Regression Tests", but it presently only talks
> about how to run the tests not how to write new ones.

Yes, most of the content of this page could be deleted.

IMO, the main docs would benefit greatly from the addition of
PG_ABS_BUILDDIR, PG_ABS_BUILDDIR, PG_LIBDIR and PG_DLSUFFIX, which are
still missing.  These are available to extension developers through
installcheck, and are a great way to write more flexible tests with
arbitrary inputs, like a dependency to on-disk files.  I would
certainly +1 this addition, at least.
--
Michael