Re: BUG #12589: Poor randomness from random() with some seeds; poor resolution

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pedro Gimeno <pgsql-004(at)personal(dot)formauri(dot)es>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12589: Poor randomness from random() with some seeds; poor resolution
Date: 2015-01-20 02:59:43
Message-ID: 10225.1421722783@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Pedro Gimeno <pgsql-004(at)personal(dot)formauri(dot)es> writes:
> Tom Lane wrote, On 2015-01-19 16:22:
>> This is not a bug; it's a feature request, and a rather poorly
>> grounded one at that.

> It's a purportedly random sequence that turns out not to be random, with
> not even a caveat in the manual. That's a bug.

It is absolutely arguable that this is a glibc bug, so I encourage you
to submit a bug report to them and see what happens. However, Postgres'
random() function is clearly documented to be just a thin layer over the
platform's random() function:

The characteristics of the values returned by random() depend on
the system implementation.

That seems to me to be a sufficient "caveat".

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pedro Gimeno 2015-01-20 05:57:46 Re: BUG #12589: Poor randomness from random() with some seeds; poor resolution
Previous Message Jamie Koceniak 2015-01-20 02:55:14 Re: BUG #12050: Orphaned base files