triggers and FK cascades

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: triggers and FK cascades
Date: 2011-03-17 22:40:45
Message-ID: AANLkTimowwWdLGbvCbCMn7-2=Xnsgm2T5Zqqq6mu4-tq@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Considering the following example.
Tables A and B.
Table A contains some data.
Table B reefers to table A using FK with 'on delete cascade'. Table B
has a trigger on it, after delete per row

Now, is there any way I can tell in the trigger on table B that it has
been called from a direct delete on that table, as oppose to the
indirect (FK) delete on table A?

Trigger is PLpg/SQL or C function.

--
GJ

Responses

Browse pgsql-general by date

  From Date Subject
Next Message MauMau 2011-03-17 22:46:57 Re: Is PostgreSQL supported on RHEL6?
Previous Message Adrian Klaver 2011-03-17 22:33:27 Re: Windows ODBC connection trouble? ISP issue?