Cloud
gen_random_uuid (uuidv4)
The gen_random_uuid() function returns a random version 4 UUID as a uuid value. uuidv4() is equivalent: both take no arguments and return a random version 4 UUID.
These functions are volatile: they return a new value on each call, so a query that calls one once per row produces a distinct UUID for each row.
Syntax
The syntax for these functions is:
gen_random_uuid()
uuidv4()
Each function takes no arguments and returns a value of type uuid.
Was this helpful?