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

From Tom Lane
Subject Re: random() function documentation
Date
Msg-id 797288.1649775821@sss.pgh.pa.us
Whole thread Raw
In response to Re: random() function documentation  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.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



pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: Temporary file access API
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: random() function documentation