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
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 <???> 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
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера