Re: BUG #3696: FK integrity check bypassed using rules. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3696: FK integrity check bypassed using rules.
Date
Msg-id 17523.1193329757@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3696: FK integrity check bypassed using rules.  ("Pierre-yves Strub" <pierre.yves.strub@gmail.com>)
Responses Re: BUG #3696: FK integrity check bypassed using rules.
List pgsql-bugs
"Pierre-yves Strub" <pierre.yves.strub@gmail.com> writes:
> CREATE TABLE data (
>   id INTEGER PRIMARY KEY DEFAULT nextval('sequence'),
>   ref_id INTEGER NULL REFERENCES data(id) ON DELETE CASCADE
> );

> CREATE RULE data_delete_rule
> AS ON DELETE TO data WHERE OLD.ref_id IS NOT NULL
> DO INSTEAD NOTHING;

Yes, a poorly designed rule can invalidate all kinds of expectations
about behavior.  This isn't a bug in my humble opinion.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3697: utf8 issue: can not reimport a table that was successfully exported.
Next
From: Gregory Stark
Date:
Subject: Re: Yet another problem with ILIKE and UTF-8