Re: What seed does random() use if setseed() is not called first?

Carl Sopchak <carl@sopchak.me>

From: Carl Sopchak <carl@sopchak.me>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@lists.postgresql.org
Date: 2022-07-23T22:09:29Z
Lists: pgsql-sql

  If it is, somewhere, it's not on the Mathematical Functions page where random() and setseed() are documented.



  



  Thanks again...



  Carl



  



  On 7/23/22 18:06, Tom Lane wrote:



  Carl Sopchak <carl@sopchak.me> writes:

  
        <p>Thank you for the quick reply!  But I wouldn't have bothered you
      if the documentation stated something to the effect of "While it's
      platform-dependent, if setseed() is not called, the random number
      generator is generally seeded by whatever method the operating
      system provides as a source of randomness, such as /dev/urandom on
      Linux/Unix, or &lt;???&gt; on Windows."</p>

  
  
Hmm, I thought this already was documented, but it looks like not.
I'll see what I can do.

                        regards, tom lane


Commits

  1. Doc: improve documentation about random().