Generate A UUID
Postgres has support for universally unique identifiers (UUIDs) as a column data type via uuid
. If you have a UUID column, you may need to generate a UUID. This requires the uuid-ossp
module. This module provides a number of functions for generating UUIDs including the uuid_generate_v4()
function which bases the UUID entirely off random numbers.
See the postgres docs for more details on UUID generation functions.
Last updated