Re: Trigger violates foreign key constraint - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Trigger violates foreign key constraint
Date
Msg-id CAJ7c6TMvi+1qh1Z3fz=FSifh0WaPRF1qtxJkAOCSThC7JMwagg@mail.gmail.com
Whole thread Raw
In response to Re: Trigger violates foreign key constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Trigger violates foreign key constraint
List pgsql-hackers
Hi,

> Perhaps we should leave the system triggers out of the discussion
> entirely?  More or less like:
>
>     If a foreign key constraint specifies referential actions (that
>     is, cascading updates or deletes), those actions are performed via
>     ordinary SQL update or delete commands on the referencing table.
>     In particular, any triggers that exist on the referencing table
>     will be fired for those changes.  If such a trigger modifies or
>     blocks the effect of one of these commands, the end result could
>     be to break referential integrity.  It is the trigger programmer's
>     responsibility to avoid that.

That's perfect!

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS
Next
From: Aleksander Alekseev
Date:
Subject: Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS