| ▲ | evil-olive 5 hours ago | |
> incorrectly advising people to use uuid4 or v7 PKs with Postgres random UUIDs vs time-based UUIDs vs sequential integers has too many trade-offs and subtleties to call one of the options "incorrect" like you're doing here. just as one example, any "just use serial everywhere" recommendation should mention the German tank problem [0] and its possible modern-day implications. for example, if you're running a online shopping website, sequential order IDs means that anyone who places two orders is able to infer how many orders your website is processing over time. business people usually don't like leaking that information to competitors. telling them the technical justification of "it saves 8 bytes per order" is unlikely to sway them. | ||
| ▲ | jim33442 an hour ago | parent [-] | |
PK isn't the same as public ID, even though you could make them the same. Normally you have a uuid4 or whatever as the public one to look up, but all the internal joins etc use the serial PKs. | ||