manually named primary key columns not properly quoted
|Reported by:||akaihola||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If the database column for a primary key is named manually using db_column= and the name contains capital letters, objects can't be saved (at least on PostgreSQL) since the column name is not properly quoted in django.db.models.save().
PostgreSQL or psycopg2 seems to convert unquoted column names to all lower case, and this has to be protected with quotes.
Change History (8)
comment:1 Changed 9 years ago by SmileyChris
- Needs documentation unset
- Needs tests set
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted