Opened 8 years ago
Last modified 5 months ago
#27452 closed New feature
Add Postgres serial field to contrib.postgres — at Initial Version
Description ¶
Since we have the beautiful contrib.postgres
package now, we can add a couple more Postgres specific fields, that are not supported by MySQL but handy to all the Postgres fan boys.
That being said, I guess it's a good idea to start with a serial field. A serial is a 4 byte integer with an implicit sequence. Ergo its and auto increment field for none primary keys! Yeah!
Usecase: You could have a customer number, or invoice number in your code. Usually it is a good idea to not use a natural primary key, therefore reusing the pk as that number could be considered bad. Having a separate field with a separate sequence solves this issue.