Skip site navigation (1) Skip section navigation (2)

Re: Referential Integrity corrupted sometimes by Rules

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jmfernandez(at)cnb(dot)uam(dot)es, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Referential Integrity corrupted sometimes by Rules
Date: 2001-07-06 18:49:26
Message-ID: 17787.994445366@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
pgsql-bugs(at)postgresql(dot)org writes:
> -- Rule over the referenced table
> -- which breaks referential integrity
> create rule nodelrel
> as on delete to rel
> where old.ref > 3 and user = 'prueba'
> do instead nothing;

This rule is preventing the foreign key triggers from performing the
DELETEs implied by your ON DELETE CASCADE command.  If we made the
triggers bypass the rules, we'd get other complaints about that.
At the moment, the rule wins.  If you want to propose a different
behavior, let's hear it.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Stephan SzaboDate: 2001-07-06 19:28:04
Subject: Re: Referential Integrity corrupted sometimes by Rules
Previous:From: Tom LaneDate: 2001-07-06 18:42:54
Subject: Re: Rules with conditions over views don't work

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group