UUID Functions
UUID Functions
PostgreSQL includes one function to generate a UUID:
gen_random_uuid () uuid
The uuid-ossp module provides additional functions that implement other standard algorithms for generating UUIDs.
PostgreSQL also provides the usual comparison operators shown in Comparison Operators for UUIDs.