You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🎉 PostgreSQL Identity Columns
[Source](https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_serial): As mentioned, the serial type in Postgres is outdated and should be deprecated. Ideally, you should not use it. Identity columns are the recommended way to specify sequences in your schema, which is why we are introducing the identity columns feature
But the rest of the docs reference serial() all over the place. I was lucky to randomly stumble upon this notice when I was searching for info on generatedAlwaysAsIdentity(), but I could have very easily missed it. For example, this page has serial() used a ton, and I think it would be best to make it clear that it's best not to use it anymore.
The text was updated successfully, but these errors were encountered:
Also, what if I just need an integer that auto-increments? Because this makes it sound like serial() shouldn't be used in general, not just for primary keys.
This page states:
But the rest of the docs reference serial() all over the place. I was lucky to randomly stumble upon this notice when I was searching for info on generatedAlwaysAsIdentity(), but I could have very easily missed it. For example, this page has serial() used a ton, and I think it would be best to make it clear that it's best not to use it anymore.
The text was updated successfully, but these errors were encountered: