Feature #2574
closedDbo: Consider defaulting to deferred foreign key constraints when available
0%
Description
Foreign key constraints with "DEFERRABLE INITIALLY DEFERRED" may permit more flexible ordering of Dbo operations (where supported). Though the use cases may be different, I believe that Django sets this default for some of their supported backends, including Postgres.
The attached patch provides for "DEFERRABLE INITIALLY DEFERRED" foreign key constraints with the Postgres and Sqlite3 Dbo backends. The patch also enables dbo_test17 for these backends.
This patch could impact portability between supported Dbo backends, for users who rely on Dbo to create schemas.
Patch is formatted with "git format-patch" against github master 3.3.1-22-g11485bb. It has only been lightly tested.
Files
Updated by Koen Deforche almost 11 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
- Target version set to 3.3.2
Hey,
That sounds really interesting. I guess it will fix this old and annoying issue on databases that support this syntax: http://redmine.emweb.be/issues/1280 ?
Regards,
koen
Updated by Bruce Toll almost 11 years ago
Hey Koen,
Thanks for following-up. I tested the sample code attached to #1280 with the patched github version and it works without the flush().
Regards,
---Bruce
Updated by Koen Deforche almost 11 years ago
- Status changed from Feedback to InProgress
Updated by Koen Deforche almost 11 years ago
- Status changed from InProgress to Resolved
Hey Bruce,
Fantastic find and work, and sorry for my redundant question: the patch already indicated how it could enable the test case that we were struggling with!
Regards,
koen
Updated by Koen Deforche almost 11 years ago
- Status changed from Resolved to Closed