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
"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;
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