Re: [GENERAL] How to defer ON DELETE CASCADE

2010-09-01 Thread Tom Lane
Arjen Nienhuis writes: > If I create a DEFERRED ON DELETE CASCADE constraint, it doesn't really work > as I expected. I expected it to defer the deletion to the end of the > transaction, but it dosn't. Yeah, this is per SQL spec as far as we can tell. Constraint checks can be deferred till end o

[GENERAL] How to defer ON DELETE CASCADE

2010-09-01 Thread Arjen Nienhuis
Hi, If I create a DEFERRED ON DELETE CASCADE constraint, it doesn't really work as I expected. I expected it to defer the deletion to the end of the transaction, but it dosn't. Is there a way to replace the contents of a table which has foreign keys? There's no MERGE/UPSERT/whatever either.