I have a lot of tables in a Postgres 14 database that use the native UUID type. Is there a database-wide setting/constraint to limit this type to only allow UUID v4?
A potential solution
I've come across CREATE DOMAIN. I can extend the UUID type, set a CONSTRAINT to CHECK the version bit to be equal to 4. After that, I'd have to include a migration with a lot of ALTER TABLES.
Is there any other way of doing this to an existing database?