Skip to content

Commit d4f109e

Browse files
committed
Doc: update description of random() function.
Commit 3804539 neglected to update the documentation's claim that random() uses a "linear congruential algorithm". In hopes of avoiding the same mistake if someone replaces our PRNG again, just say it's a deterministic pseudo-random number generator and leave it at that. Anybody who really wants to know can look in the source code. COMPATIBILITY NOTE FOR RELEASE NOTES: 3804539's commit message really should have mentioned that the random() sequence after setseed(), while still repeatable, will differ from what you got in pre-v15 releases. Noted by Dagfinn Ilmari Mannsåker; wording suggestion by Dean Rasheed. Discussion: https://postgr.es/m/875ynfpiru.fsf@wibble.ilmari.org
1 parent e7cc4a6 commit d4f109e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/src/sgml/func.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,8 +1832,9 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
18321832
</table>
18331833

18341834
<para>
1835-
The <function>random()</function> function uses a simple linear
1836-
congruential algorithm. It is fast but not suitable for cryptographic
1835+
The <function>random()</function> function uses a deterministic
1836+
pseudo-random number generator.
1837+
It is fast but not suitable for cryptographic
18371838
applications; see the <xref linkend="pgcrypto"/> module for a more
18381839
secure alternative.
18391840
If <function>setseed()</function> is called, the series of results of

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy