agirorn / factful

Event-store library for PostgresSQL
MIT License
0 stars 0 forks source link

Suggest changing from uuid-ossp to pgcrypto #1

Open nossrannug opened 3 years ago

nossrannug commented 3 years ago

Postgres recommends using pgcrypto when you only need uuid_v4.

image

https://www.postgresql.org/docs/12/uuid-ossp.html

agirorn commented 3 years ago

They don't state why it is recommended. The only thing I have found is that they seem to use different random number generators.

https://dba.stackexchange.com/questions/205902/postgresql-two-different-ways-to-generate-a-uuid-gen-random-uuid-vs-uuid-genera#answer-205917

If this is not causing any issues then I would prefer to keep it as is.

nossrannug commented 3 years ago

I don't think it will cause any issues. But gen_random_uuid() offers better performance (link), and it comes included in PostgreSQL 13 (link)

BAR