title: PostgreSQL: serial vs identity
body: <p>To have an integer auto-numbering primary key on a table, you can use <a href="https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL" rel="noreferrer"><code>SERIAL</code></a></p>
  
  <p>But I noticed the table <code>information_schema.columns</code> has a number of <code>identity_</code> fields, and indeed, you could <a href="https://www.postgresql.org/docs/11/sql-createtable.html" rel="noreferrer">create a column with a <code>GENERATED</code> specifier</a>...</p>
  
  <p>What's the difference? Were they introduced with different PostgreSQL versions? Is one preferred over the other?</p>