To have an integer auto-numbering primary key on a table, you can use SERIAL
But I noticed the table information_schema.columns
has a number of identity_
fields, and indeed, you could create a column with a GENERATED
specifier...
What's the difference? Were they introduced with different PostgreSQL versions? Is one preferred over the other?