Re: What seed does random() use if setseed() is not called first? - Mailing list pgsql-sql

From Tom Lane
Subject Re: What seed does random() use if setseed() is not called first?
Date
Msg-id 1220338.1658612839@sss.pgh.pa.us
Whole thread Raw
List 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



pgsql-sql by date:

Previous
From: Steve Midgley
Date:
Subject: Re: A function to find errors in groups in a table
Next
From: Tom Lane
Date:
Subject: Re: What seed does random() use if setseed() is not called first?