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:22:31
Message-ID: AANLkTilKw6C8RqNrFy3RSgJ_87fED3CuTmDCI9mKEeP_@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>:
> well, change foob column name to something else, and try yourself. It
> still fails.
>

Wait a minute... it's deleting from foob, which is considered deleted
for the remainder of that transaction. This cascades to fooa which
sets off the trigger before it does anything, and the result you're
getting out says that the same value is no longer is foob, which,
while not yet committed, is true as far as the transaction is
concerned. This is confusing because I thought the default
transaction isolation level was READ COMMITTED. :/

Regards

Thom

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2010-06-23 15:31:40 Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE
Previous Message Teodor Macicas 2010-06-23 15:22:19 Re: what is the meaning of Datum?