#30511: AutoField with postgres10/11 as generated identity.
-------------------------------------+-------------------------------------
Reporter: Michael Kany | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgres generated | Triage Stage:
identity | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Michael Kany):
I agree that there is not much value in replacing serial with GENERATED AS
IDENTITY.
What I suggest is to add extra fields related to GENERATED AS IDENTITY to
the PostgreSQL backends as an alternative option to SERIAL since it is an
option in PostgreSQL and it is actually SQL-standard compliant compared to
SERIAL.
Since PostgreSQL 10 there is the option to use GENERATED AS IDENTITY, I
would like to suggest to make Django compatible with this feature by
adding two extra AutoField-like fields.
• IdentityAutoField with inner workings like AutoField with SERIAL
but with GENERATED AS IDENTITY
• IdentityBigAutoField with inner workings like BigAutoField with
SERIAL but with GENERATED AS IDENTITY
These fields would probably be interesting only for Postgres user.
--
Ticket URL: <https://code.djangoproject.com/ticket/30511#comment:3>
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/068.04986717e5dc3bcf1290212b2269ce19%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.