mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -177,8 +177,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="parameter">timezone</rep
|
||||
<para>
|
||||
Sets the internal seed for the random number generator (the
|
||||
function <function>random</function>). Allowed values are
|
||||
floating-point numbers between -1 and 1, which are then
|
||||
multiplied by 2<superscript>31</superscript>-1.
|
||||
floating-point numbers between -1 and 1 inclusive.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user