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

From: Carl Sopchak <carl(at)sopchak(dot)me>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: What seed does random() use if setseed() is not called first?
Date: 2022-07-23 21:18:40
Message-ID: f37bb937-9d99-08f0-4de7-80c91a3cfc2e@sopchak.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<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>
<p>Thanks for the help!</p>
<p>Carl<br>
</p>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 493 bytes

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2022-07-23 21:47:19 Re: What seed does random() use if setseed() is not called first?
Previous Message Steve Midgley 2022-06-09 23:25:27 Re: A function to find errors in groups in a table