Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFNGF-00034X-Cv for pgsql-sql@arkaria.postgresql.org; Sat, 23 Jul 2022 22:06:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oFNGD-00059z-VU for pgsql-sql@arkaria.postgresql.org; Sat, 23 Jul 2022 22:06:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFNGD-00059q-Mt for pgsql-sql@lists.postgresql.org; Sat, 23 Jul 2022 22:06:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFNG8-0008Tl-2Z for pgsql-sql@lists.postgresql.org; Sat, 23 Jul 2022 22:06:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26NM61kJ1222811; Sat, 23 Jul 2022 18:06:01 -0400 From: Tom Lane To: Carl Sopchak cc: pgsql-sql@lists.postgresql.org Subject: Re: What seed does random() use if setseed() is not called first? In-reply-to: References: <1220338.1658612839@sss.pgh.pa.us> Comments: In-reply-to Carl Sopchak message dated "Sat, 23 Jul 2022 17:55:40 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1222808.1658613961.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sat, 23 Jul 2022 18:06:01 -0400 Message-ID: <1222809.1658613961@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Carl Sopchak writes: >

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 <???> on Windows."

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