How about we just say "uses a linear-feedback shift register algorithm"?
I think it'd be sufficient to just say that it's a deterministic
pseudorandom number generator. I don't see much value in documenting
the internal algorithm used.
Hmmm… I'm not so sure. ISTM that people interested in using the random
user-facing variants (only random?) could like a pointer on the algorithm
to check for the expected quality of the produced pseudo-random stream?
See attached.
Should we perhaps also add a warning that the same seed is not
guaranteed to produce the same sequence across different (major?)
versions?
I wouldn't bother, on the grounds that then we'd need such disclaimers
in a whole lot of places. Others might see it differently though.
Agreed,
Agreed.
though I think when the release notes are written, they ought
to warn that the sequence will change with this release.
Yes.
--
Fabien.
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 0a5c402640..7492454592 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1832,10 +1832,11 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
</table>
<para>
- The <function>random()</function> function uses a simple linear
- congruential algorithm. It is fast but not suitable for cryptographic
- applications; see the <xref linkend="pgcrypto"/> module for a more
- secure alternative.
+ The <function>random()</function> function uses
+ <ulink url="https://en.wikipedia.org/wiki/Xoroshiro128%2B">xoroshiro128**</ulink>, a
+ linear feedback shift register algorithm.
+ It is fast but not suitable for cryptographic applications;
+ see the <xref linkend="pgcrypto"/> module for a more secure alternative.
If <function>setseed()</function> is called, the series of results of
subsequent <function>random()</function> calls in the current session
can be repeated by re-issuing <function>setseed()</function> with the same