pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: improve documentation about random().
Date: Sat, 23 Jul 2022 23:00:42 +0000
Message-ID: <E1oFO6z-000wev-3Q@gemulon.postgresql.org> (raw)

Doc: improve documentation about random().

We didn't explicitly say that random() uses a randomly-chosen seed
if you haven't called setseed().  Do so.

Also, remove ref/set.sgml's no-longer-accurate (and never very
relevant) statement that the seed value is multiplied by 2^31-1.

Back-patch to v12 where set.sgml's claim stopped being true.
The claim that we use a source of random bits as seed was debatable
before 4203842a1, too, so v12 seems like a good place to stop.

Per question from Carl Sopchak.

Discussion: https://postgr.es/m/f37bb937-9d99-08f0-4de7-80c91a3cfc2e@sopchak.me

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/31d5354cb148c6aa90014f62d3a4752adeebd51a

Modified Files
--------------
doc/src/sgml/func.sgml    | 3 +++
doc/src/sgml/ref/set.sgml | 3 +--
2 files changed, 4 insertions(+), 2 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1oFO6z-000wev-3Q@gemulon.postgresql.org>
Permalink:  ../E1oFO6z-000wev-3Q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oFO6z-000wev-3Q@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Doc: improve documentation about random().
  In-Reply-To: <E1oFO6z-000wev-3Q@gemulon.postgresql.org>
  References: <E1oFO6z-000wev-3Q@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox