Safe to change the way UUIDs are generated for the auth.users `id` column?

Hi, is it safe to create a postgres function (specifically this one: https://gist.github.com/kjmph/5bd772b2c2df145aa645b837da7eca74?permalink_comment_id=4306020#gistcomment-4306020) and set that as the column_default for the
id
column in the auth.users table?

ALTER TABLE "auth"."users" ALTER COLUMN "id" SET DEFAULT 'uuid_generate_v7()';


Will it even work?
Gist
Postgres PL/pgSQL function for UUID v7 and a bonus custom UUID v8 to support microsecond precision as well. Read more here: https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ ...
Was this page helpful?