Re: [BUGS] BUG #3696: FK integrity check bypassed using rules.

2007-10-25 Thread Pierre-Yves Strub
On 10/25/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Yes, a poorly designed rule can invalidate all kinds of expectations > about behavior. This isn't a bug in my humble opinion. Yes, this was my first impression. I was just surprised because of this: the script CREATE TABLE dat

Re: [BUGS] BUG #3696: FK integrity check bypassed using rules.

2007-10-25 Thread Tom Lane
"Pierre-yves Strub" <[EMAIL PROTECTED]> 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;

[BUGS] BUG #3696: FK integrity check bypassed using rules.

2007-10-25 Thread Pierre-yves Strub
The following bug has been logged online: Bug reference: 3696 Logged by: Pierre-yves Strub Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.5 / 8.3b Operating system: Linux 2.6 Description:FK integrity check bypassed using rules. Details: Hello. Here is a S