Re: random() function documentation - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: random() function documentation
Date
Msg-id CAEZATCVOKJvvjsEhbKLjpFtbNvnGEmf51gXJbG3Y=FV_LQoPbA@mail.gmail.com
Whole thread Raw
In response to Re: random() function documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: random() function documentation  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On Mon, 11 Apr 2022 at 20:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> >> How about we just say "uses a linear-feedback shift register algorithm"?

I think it'd be sufficient to just say that it's a deterministic
pseudorandom number generator. I don't see much value in documenting
the internal algorithm used.

> > Should we
> > perhaps also add a warning that the same seed is not guaranteed to
> > produce the same sequence across different (major?) versions?
>
> I wouldn't bother, on the grounds that then we'd need such disclaimers
> in a whole lot of places.  Others might see it differently though.

Agreed, though I think when the release notes are written, they ought
to warn that the sequence will change with this release.

Regards,
Dean



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: How about a psql backslash command to show GUCs?