Let's say I create a table foo with a column row, which should be a very large random integer.
CREATE TABLE foo ( bar bigint DEFAULT round(((9223372036854775807::bigint)::double precision * random())) NOT NULL, baz text );
Is this the best way to do this? Can anyone talk about the quality of the PostgreSQL random() function? Is multiplication here a disguise of entropy?
Note that I have good hardware entropy in /dev/random .
random postgresql entropy prng
Dustin Kirkland Mar 22 2018-12-12T00: 00Z
source share