From 9c24111c4dad850bc2625c2113bb3d2dfd592efc Mon Sep 17 00:00:00 2001 From: Dean Rasheed Date: Thu, 11 Sep 2025 09:25:47 +0100 Subject: [PATCH] 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 Discussion: https://postgr.es/m/CAB-JLwb1=drA3Le6uZXDBi_tCpeS1qm6XQU7dKwac_x91Z4qDg@mail.gmail.com --- doc/src/sgml/func/func-datetime.sgml | 6 ++++++ doc/src/sgml/func/func-math.sgml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/func/func-datetime.sgml b/doc/src/sgml/func/func-datetime.sgml index 98dd60aa9a7..a25da4b5175 100644 --- a/doc/src/sgml/func/func-datetime.sgml +++ b/doc/src/sgml/func/func-datetime.sgml @@ -948,6 +948,12 @@ Returns a random value in the range min <= x <= max. + + Note that these functions use the same pseudo-random number generator + as the functions listed in , + and respond in the same way to calling + setseed(). + random('1979-02-08'::date,'2025-07-03'::date) 1983-04-21 diff --git a/doc/src/sgml/func/func-math.sgml b/doc/src/sgml/func/func-math.sgml index fd821c0e706..9dcf97e7c9e 100644 --- a/doc/src/sgml/func/func-math.sgml +++ b/doc/src/sgml/func/func-math.sgml @@ -1130,7 +1130,7 @@ - + setseed setseed ( double precision ) -- 2.39.5