Generate a UUID as PostgreSQL default value
As we know, PostgreSQL has a UUID data type, but you cannot generate a UUID as the default value by default, in general, we generate a UUID first and insert the UUID into the database, might it be very bothered?
What if we can automatically generate a UUID as the default value? Sounds cool, and we have two ways to do it.