Re: [BUGS] Foreign key constaint can be broken

2010-01-26 Thread Fabien COELHO
I found a way to break a foreign key constraint in PostgreSQL [ ie, make a rule that defeats an ON DELETE CASCADE operation ] This isn't a bug, it's just the way things work. Rules (and triggers) apply to the commands that implement foreign key updates, so a poorly written rule can make those

Re: [BUGS] Foreign key constaint can be broken

2010-01-26 Thread Tom Lane
Mark Kazemier writes: > I found a way to break a foreign key constraint in PostgreSQL > [ ie, make a rule that defeats an ON DELETE CASCADE operation ] This isn't a bug, it's just the way things work. Rules (and triggers) apply to the commands that implement foreign key updates, so a poorly writ

[BUGS] Foreign key constaint can be broken

2010-01-26 Thread Mark Kazemier
Dear, I found a way to break a foreign key constraint in PostgreSQL. I discussed this bug on a dutch discussion board and multiple people tried this on multiple versions. When I create the following tables: CREATE TABLE a ( id SERIAL NOT NULL, foo CHAR(100) NOT NULL, PRIMARY KEY(id) ); CREATE