postgresql_16:9.6.28.5 Random-Data Functions
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > pgcrypto — cryptographic functions > Random-Data Functions
gen_random_bytes(count integer) returns bytea
Returns count cryptographically strong random bytes. At most 1024 bytes can be extracted at a time. This is to avoid draining the randomness generator pool.
gen_random_uuid() returns uuid
Returns a version 4 (random) UUID. (Obsolete, this function internally calls the core function (see postgresql_16:3.6.14) of the same name.)