top | item 45622823

(no title)

lucasyvas | 4 months ago

These are all non-issues - don’t allow an end user to determine a serial primary key as always.

And the amount of information it leaks is negligible - they might know the oldest and the newest and there’s an infinite gulf in between.

It’s better and more practical than SERIAL or BIGSERIAL in every way - if you need a random/external ID, add a second column. Done.

discuss

order

morshu9001|4 months ago

Why not serial PK with uuid4 secondary? Every join uses your PK and will be faster.

Biganon|4 months ago

> if you need a random/external ID, add a second column. Done.

As others have stated, it completely defeats the performance purpose, if you need to lookup using another ID.