There are many ways to handle ID generation in PostgreSQL, but I’ve chosen to investigate these four approaches:

Auto-incrementing (SERIAL data type)
Sequence-incrementing with client-side ID management

Depending on your application and your underlying database tables, you might choose to employ one or more of these options. Below, I’ll explain how each can be achieved in Node.js using the Sequelize ORM.

Leave a Reply

Your email address will not be published. Required fields are marked *