PostgreSQL: Generate UUID

2019-05-31 06:12:15+00

Sometimes you need to insert data into an postgresql database with a uuid generated.

SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring) as id; id -------------------------------------- d50cb732-22e8-ed41-bc8e-b0fe8298f1b0

Tag: postgresql postgresql11