Re: random() function documentation

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: random() function documentation
Date: 2022-04-12 00:18:58
Message-ID: CAEZATCVOKJvvjsEhbKLjpFtbNvnGEmf51gXJbG3Y=FV_LQoPbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 11 Apr 2022 at 20:20, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonathan S. Katz 2022-04-12 00:35:52 Re: How about a psql backslash command to show GUCs?
Previous Message Michael Paquier 2022-04-12 00:03:51 Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory