Comment

Comment by ThePhysicist

I've had good success with using auto-incrementing BIGINTs as internal IDs and creating an additional BYTEA field as external IDs. Foreign keys would be based on the internal IDs, anything user-facing would use external IDs. I think it's a good compromise as it keeps foreign key size small and still allows hiding internal structure from users.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton