1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

doc: Improve description of new random(min, max) functions.

Mention that the new variants of random(min, max) are affected by
setseed(), like the original functions.

Reported-by: Marcos Pegoraro <marcos@f10.com.br>
Discussion: https://postgr.es/m/CAB-JLwb1=drA3Le6uZXDBi_tCpeS1qm6XQU7dKwac_x91Z4qDg@mail.gmail.com
This commit is contained in:
Dean Rasheed
2025-09-11 09:25:47 +01:00
parent 26eadf4d2b
commit 9c24111c4d
2 changed files with 7 additions and 1 deletions

View File

@@ -948,6 +948,12 @@
Returns a random value in the range
<parameter>min</parameter> &lt;= x &lt;= <parameter>max</parameter>.
</para>
<para>
Note that these functions use the same pseudo-random number generator
as the functions listed in <xref linkend="functions-math-random-table"/>,
and respond in the same way to calling
<link linkend="function-setseed"><function>setseed()</function></link>.
</para>
<para>
<literal>random('1979-02-08'::date,'2025-07-03'::date)</literal>
<returnvalue>1983-04-21</returnvalue>

View File

@@ -1130,7 +1130,7 @@
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<indexterm id="function-setseed">
<primary>setseed</primary>
</indexterm>
<function>setseed</function> ( <type>double precision</type> )