Opened 17 years ago
Closed 17 years ago
#5114 closed (duplicate)
Capitalized model name causes problem with many to many relation in postgres
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | m2m capitalization postgres table name | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
In [source:django/trunk/django/db/backends/postgresql/base.py@r5609#L274 postgresql/base.py line 274]
there is an SQL table name problem. Many to many table references with capitalization is not being quoted properly.
This prevented me from loading my fixtures.
Attached is my modified and outdated base.py file, with the fix at line 244.
Hope this helps...
- Aaron.
Attachments (1)
Change History (4)
by , 17 years ago
comment:1 by , 17 years ago
Hi Aaron, could you please provide a diff patch rather than just the whole file thanks?
comment:2 by , 17 years ago
Patch needs improvement: | set |
---|
Hi SmileyChris,
Sorry, I'll need someone else to follow up in the short term. I would love to submit a proper diff patch, but I have a tight deadline and don't have a working SVN copy on hand. Will have to do it later.
I did verify against latest trunk version though, and pointed out the file, revision, and line number.
fixed postgres base.py at line 244, properly quotes the m2m_db_table()