PG and Oracle allow you to defer foreign key constraints (Oracle
apparently lets you defer *all* constraints, mmm), and MySQL and
SQLite (of course) don't. I'm not sure about other databases. The SQL
keyword in question is DEFERRABLE.

References:

http://www.postgresql.org/docs/8.2/interactive/sql-createtable.html
http://www.postgresql.org/docs/8.2/interactive/sql-set-constraints.html

http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/general.htm#i1006803
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/clauses002.htm#sthref2933
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10003.htm#i2066960

On Feb 22, 3:20 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> ive heard of foreign key constraints that dont take effect until the  
> tranasction actually commits, but I have never actually seen this in  
> practice.  which databases support this feature ?  i didnt think it  
> was so common (though not surprised PG supports it).
>
> On Feb 22, 2007, at 1:15 PM, Luke Stebbing wrote:
>
>
>
> > Are there any plans to handle circular dependencies by using
> > deferrable foreign key constraints when available?
>
> > In my case, I had made the foreign key constraints deferred, but
> > SQLAlchemy didn't pick up on that when I reflected the database
> > metadata. I eliminated the circular dependency by using
> > post_update=True, but that meant dropping a NOT NULL constraint since
> > postgres can't defer those (sigh).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to