]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Doc: improve documentation about random().
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 23 Jul 2022 23:00:30 +0000 (19:00 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 23 Jul 2022 23:00:30 +0000 (19:00 -0400)
commit4c9e5162f56d2e9d8e690000a046ff4f59e2268d
treefcf9a1c075ee1cb20fa7e4f30ac9e7495b02d062
parent43fe5134b0d40db6f120097dd045468f8100807b
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
doc/src/sgml/func.sgml
doc/src/sgml/ref/set.sgml