#27452: Add Postgres serial field to contrib.postgres -------------------------------------+------------------------------------- Reporter: Johannes Maron | Owner: | InvalidInterrupt Type: New feature | Status: assigned Component: contrib.postgres | Version: dev Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 1 Needs tests: 1 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Comment (by Simon Charette):
FWIW [https://forum.djangoproject.com/t/django-4-2-is-a-2nd-autofield- like-field-on-a-model-possible/28278/4 someone was able to implement] an `IdentityField` which is kind of the equivalent of `GeneratedField` if it supported `AS IDENTITY`. It's not the equivalent of `SerialField` though but it demonstrates that all the pieces are there to implement it based on `db_returning` and `pre_save` returning a `Default` expression. -- Ticket URL: <https://code.djangoproject.com/ticket/27452#comment:24> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018dca029bfe-989a90a7-4cdd-4ee2-b5ae-2bfb9f398486-000000%40eu-central-1.amazonses.com.