random ( ) → double precisionReturns a random value in the range 0.0 <= x < 1.0
random() → 0.897124072839091
Functions / Mathematical Functions And Operators
Returns a random value in the range 0.0 <= x < 1.0
Reading PG 18current·documented in 27 of 27 versions, 7.1 to 20
random ( ) → double precisionReturns a random value in the range 0.0 <= x < 1.0
random() → 0.897124072839091
random ( min integer, max integer ) → integerReturns a random value in the range
min <= x <= max. For type numeric, the result will have the same number of fractional decimal digits as min or max, whichever has more.random(1, 10) → 7
random(-0.499, 0.499) → 0.347
random ( min bigint, max bigint ) → bigintReturns a random value in the range
min <= x <= max. For type numeric, the result will have the same number of fractional decimal digits as min or max, whichever has more.random(1, 10) → 7
random(-0.499, 0.499) → 0.347
random ( min numeric, max numeric ) → numericReturns a random value in the range
min <= x <= max. For type numeric, the result will have the same number of fractional decimal digits as min or max, whichever has more.random(1, 10) → 7
random(-0.499, 0.499) → 0.347
Definition snapshot: b7bd9cda · English manual source