Re: random() function documentation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, 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 15:03:41
Message-ID: 797288.1649775821@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>>> 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.

> Hmmm… I'm not so sure. ISTM that people interested in using the random
> user-facing variants (only random?) could like a pointer on the algorithm
> to check for the expected quality of the produced pseudo-random stream?

> See attached.

I don't want to get that specific. We were not specific before and
there has been no call for such detail in the docs. (Unlike
closed-source software, anybody who really wants algorithmic details
can find all they want to know in the source code.) It would just
amount to another thing to forget to update next time someone changes
the algorithm ... which is a consideration that leads me to favor
Dean's phrasing.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari Mannsåker 2022-04-12 15:12:06 Re: random() function documentation
Previous Message Matthias van de Meent 2022-04-12 15:00:24 Re: Temporary file access API