pgsql: Doc: improve documentation about random().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Doc: improve documentation about random().
Date: 2022-07-23 23:00:42
Message-ID: E1oFO6z-000wf1-4T@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Doc: improve documentation about random().

We didn't explicitly say that random() uses a randomly-chosen seed
if you haven't called setseed(). Do so.

Also, remove ref/set.sgml's no-longer-accurate (and never very
relevant) statement that the seed value is multiplied by 2^31-1.

Back-patch to v12 where set.sgml's claim stopped being true.
The claim that we use a source of random bits as seed was debatable
before 4203842a1, too, so v12 seems like a good place to stop.

Per question from Carl Sopchak.

Discussion: https://postgr.es/m/f37bb937-9d99-08f0-4de7-80c91a3cfc2e@sopchak.me

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/042554d55d8539ea621ecf25d10d8c38ff1a2324

Modified Files
--------------
doc/src/sgml/func.sgml | 3 +++
doc/src/sgml/ref/set.sgml | 3 +--
2 files changed, 4 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2022-07-25 01:59:55 pgsql: Remove useless arguments in ReadCheckpointRecord().
Previous Message Thomas Munro 2022-07-23 21:46:47 pgsql: Remove dead getpwuid_r replacement code.