#27452: Add Postgres serial field to contrib.postgres
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: contrib.postgres | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):
Replying to [comment:32 Florian Apolloner]:
> To be honest I'd be slightly in favor of removing the existing
limitations of AutoFields where databases can support it (if we are able
to decide that it makes sense semantically at least). Adding a new field
that basically does the same thing as an existing field kinda feels wrong.
Granted, an explicit Serial/IdentityField would allow to specifiy more
options (like adjusting the sequence name), but I am not sure if that
would be a common enough usecase to add it to django itself.
I was thinking the same thing initially, but this ticket was already
Accepted, while [https://code.djangoproject.com/ticket/8576 #8576]
received a lot of push back and was closed as wontfix.
IMO, another legit use-case is an "order column" - an auto-generated
sequence that can be changed by the users. Semantically, it makes more
sense to use SERIAL over IDENTITY for this.
--
Ticket URL: <https://code.djangoproject.com/ticket/27452#comment:33>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070190557fa9d2-0eb910d1-caaf-4ecf-853d-a08463985fc5-000000%40eu-central-1.amazonses.com.