Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE - Mailing list pgsql-general

From Thom Brown
Subject Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE
Date
Msg-id AANLkTinHaWfy7k0w8XREpBczNQRZOqUcR1PXs-aGrPQ4@mail.gmail.com
Whole thread Raw
In response to Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Responses Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE
List pgsql-general
2010/6/23 Grzegorz Jaśkiewicz <gryzman@gmail.com>:
> it is confusing to me, because I thought triggers are firring BEFORE
> anything goes away. So I assume that all data is still going to be
> visible to the trigger, as it is firing BEFORE. The only thing is, it
> looks like the FKs are doing the deletion and than things are handed
> over to triggers.
>

The trigger is on fooa though, not foob.  foob's deletions occur
before cascading to fooa, and only then does the function trigger.

I still think tranaction isolation level should come into this somewhere.

Thom

pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE