TLDR Web Dev · OPINIONS & ADVICE
STOP USING SERIAL IN POSTGRES
Summary from the TLDR Web Dev newsletter
It's better to use identity columns instead of using the serial data type in Postgres. This is because `serial` has several issues, like permission complexities, a lack of integrity guarantees, and awkward ergonomics. Identity columns provide a better way to manage auto-incrementing primary keys and are also compliant with the SQL standard.