#30511: Support Identity columns on PostgreSQL.
-------------------------------------+-------------------------------------
Reporter: Michael Kany | Owner: Michael
| Kany
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgres generated | Triage Stage: Accepted
identity |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Michael Kany):
Ich habe gesehen, das es anstelle der vorgeschlagenene zwei neuen Field
classes ('IdentityAutoField': 'integer', 'IdentityBigAutoField':
'bigint',)
Ist es möglich die AutoField-klasse so zu erweitern
Zum beispiel mit:
class AutoField(Field):
...
generated_identity = False # für die unterscheidung serial oder generated
generated_by_default = False # für GENERATED ALWAYS wenn False/ GENERATED
BY DEFAULT wenn True
seq_opt_start_with = 1
seq_opt_increment_by = 1
def __init__(self, generated_identity = False, generated_by_default =
False, seq_opt_start_with = 1, seq_opt_increment_by = 1, **kwargs):
...
Da ist auch ein anderes Ticket
#56 Primary key columns should be UNSIGNED
das mit den Parametern
seq_opt_start_with = 1
seq_opt_increment_by = 1
gegebenenfalls passen würde. Test ob seq_opt_start_with >= 0
--
Ticket URL: <https://code.djangoproject.com/ticket/30511#comment:8>
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.8091b4d5dc7f79189f299bfbd8dc09e6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.