Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE

From: Thom Brown <thombrown(at)gmail(dot)com>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: adrian(dot)klaver(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE
Date: 2010-06-23 15:35:05
Message-ID: AANLkTinHaWfy7k0w8XREpBczNQRZOqUcR1PXs-aGrPQ4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/6/23 Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2010-06-23 15:41:13 Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE
Previous Message Thom Brown 2010-06-23 15:33:10 Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE