Bugs item #1824835, was opened at 2007-11-02 12:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1824835&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Postgres
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Kenji Noguchi (kenjinoguchi)
Assigned to: Nobody/Anonymous (nobody)
Summary: ForeignKey gets error with column names that contain "
Initial Comment:
Maybe this is PostgreSQL specific problem. Postgres needs table/column names to be quoted by "" when the name is non-ASCII or when you need to preserve cases.
With such tables/columns SQLObject failes to create constraint because the constraint naming rule simply appends '_exists' after the names.
Say I have a ForeignKey constraint like this;
class Order(SQLObject):
class sqlmeta:
table = '"Order"'
...
store = ForeignKey('Store', dbName='"StoreID"')
This definition generates a wrong SQL like this;
ALTER TABLE "Order" ADD CONSTRAINT "StoreID"_exists FOREIGN ...
It's a simple problem that _exists need to be inside of the quote if original name is quoted by "".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1824835&group_id=74338
|