Re: Sequence vs UUID
От | Miles Elam |
---|---|
Тема | Re: Sequence vs UUID |
Дата | |
Msg-id | CAALojA_+ar2YQcB7u+LGXEO_6P9j=Me-XQhMUvALa+=rYSGzXQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Sequence vs UUID (Ron <ronljohnsonjr@gmail.com>) |
Ответы |
Re: Sequence vs UUID
|
Список | pgsql-general |
On Sat, Jan 28, 2023 at 8:02 PM Ron <ronljohnsonjr@gmail.com> wrote: > > Then it's not a Type 4 UUID, which is perfectly fine; just not random. Yep, which is why it really should be re-versioned to UUIDv8 to be pedantic. In everyday use though, almost certainly doesn't matter. > Also, should now() be replaced by clock_timestamp(), so that it can be > called multiple times in the same transaction? Not necessary. Instead of 122 bits of entropy, you get 106 bits of entropy and a new incremented prefix every minute. now() vs clock_timestamp() wouldn't make a substantive difference. Should still be reasonably safe against the birthday paradox for more than a century when creating more than a million UUIDs per second.
В списке pgsql-general по дате отправления: