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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Carl Sopchak <carl@sopchak.me>
Cc: pgsql-sql@lists.postgresql.org
Date: 2022-07-23T21:47:19Z
Lists: pgsql-sql
Carl Sopchak <carl@sopchak.me> writes:
>     <p>There is one point about the documentation for random() and
>       setseed() that is missing.  What is used to seed random() if
>       setseed() isn't called first?  I assume it's something like
>       /dev/random or /dev/urandom, but that's just a guess.  Can someone
>       please enlighten me?</p>

We don't document this because it's platform- and version-dependent,
but yeah, generally /dev/urandom or local equivalent.

			regards, tom lane



Commits

  1. Doc: improve documentation about random().