random() function documentation

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: random() function documentation
Date: 2022-04-11 18:38:45
Message-ID: 875ynfpiru.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Hackers,

I just noticed that the since the random() rewrite¹, the documentation's
claim² that it "uses a simple linear congruential algorithm" is no
longer accurate (xoroshiro128** is an xorshift variant, which is a
linear-feedback shift register algorithm).

I don't have a suggestion for the exact wording, since I don't know
whether xoroshiro128** qualifies as "simple", or to what level of
specificity we want to document the algorithm.

- ilmari

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=3804539e48e794781c6145c7f988f5d507418fa8
[2] https://www.postgresql.org/docs/devel/functions-math.html#FUNCTIONS-MATH-RANDOM-TABLE

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2022-04-11 18:43:13 Re: GSoC: pgBackRest port to Windows
Previous Message Nathan Bossart 2022-04-11 18:37:07 Re: [Proposal] vacuumdb --schema only