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: aaron@… 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)

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

Download all attachments as: .zip

Change History (4)

by aaron@…, 17 years ago

Attachment: base.py added

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

comment:1 by Chris Beaven, 17 years ago

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

comment:2 by aaron@…, 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.

comment:3 by John Shaffer <jshaffer2112@…>, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #4492.

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