random()

A function returning a random value

random() is a system function which returns a random value of 0.0 or greater but less than 1.0.

random() has always been present in PostgreSQL.

Usage

random ( ) → double precision

Note that random() is not considered secure for cryptographic use; see pgcrypto.

Change history

Categories

System function

See also

setseed(), pgcrypto, gen_random_uuid()