mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Clean up bogosities in use of random(3) and srandom(3) --- do not assume
that RAND_MAX applies to them, since it doesn't. Instead add a config.h parameter MAX_RANDOM_VALUE. This is currently set at 2^31-1 but could be auto-configured if that ever proves necessary. Also fix some outright bugs like calling srand() where srandom() is appropriate.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.46 2000/07/14 15:27:14 thomas Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.47 2000/08/07 00:51:18 tgl Exp $
|
||||
Postgres documentation
|
||||
-->
|
||||
|
||||
@@ -194,9 +194,9 @@ SET TIME ZONE { '<replaceable class="PARAMETER">timezone</replaceable>' | LOCAL
|
||||
<listitem>
|
||||
<para>
|
||||
The value for the seed to be used by the
|
||||
<function>random</function> catalog function. Significant
|
||||
<function>random</function> function. Allowed
|
||||
values are floating point numbers between 0 and 1, which
|
||||
are then multiplied by RAND_MAX. This product will
|
||||
are then multiplied by 2^31-1. This product will
|
||||
silently overflow if a number outside the range is used.
|
||||
</para>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user