PostgreSQL: Generate UUID

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

Published: May 23, 2022

Change Content

The information on this page is user generated content. The content does not claim to be complete or correct.

Everybody is invited to add or change the data. Just click on this link. No login or email is required. Thanks.