Opened 8 years ago

Closed 8 years ago

#5114 closed (duplicate)

Capitalized model name causes problem with many to many relation in postgres

Reported by: aaron@… Owned by: adrian
Component: Database layer (models, ORM) Version: master
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: UI/UX:

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)

base.py (10.6 KB) - added by aaron@… 8 years ago.
fixed postgres base.py at line 244, properly quotes the m2m_db_table()

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by aaron@…

fixed postgres base.py at line 244, properly quotes the m2m_db_table()

comment:1 Changed 8 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Hi Aaron, could you please provide a diff patch rather than just the whole file thanks?

comment:2 Changed 8 years ago by aaron@…

  • 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.

comment:3 Changed 8 years ago by John Shaffer <jshaffer2112@…>

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #4492.

Note: See TracTickets for help on using tickets.
Back to Top