3 ms·
Not a fantastic post, which is a shame as Supabase is quite an interesting company. The answer is almost always "use biginteger identity", and almost never "us
by orf 4y ago
Not a fantastic post, which is a shame as Supabase is quite an interesting company.
The answer is almost always "use biginteger identity", and almost never "use integer serial".
UUIDs have a place but are often better suited in larger, distributed and more complex data stores than postgres.
Using `xid` is such a poor choice I'm surprised it was even mentioned.
The "key" thing to remember is you don't have to expose your primary key to the world. Use UUIDs or shortcodes or whatever for external representations. Use bigints internally. This will prevent a world of pain.