#27452: Add Postgres serial field to contrib.postgres
--------------------------------------------+------------------------
Reporter: Johannes Hoppe | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/27452>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.6d166557eab9da040d8bd1c6160c9c7f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.