
test=# CREATE TABLE rrr (id int);
CREATE
test=# CREATE RULE rrr_r AS ON DELETE TO rrr 
	DO INSTEAD SELECT 'Not Delete';
CREATE
test=# INSERT INTO rrr VALUES (1);
INSERT 161557 1
test=# INSERT INTO rrr VALUES (2);
INSERT 161558 1
test=# DELETE FROM rrr;
  ?column?
------------
 Not Delete
(1 row)


Well, all is right. I add 'WHERE OLD.id = 2' to rule definition 
and:

test=# DROP RULE rrr_r;
DROP
test=# CREATE RULE rrr_r AS ON DELETE TO rrr WHERE OLD.id = 2 
	DO INSTEAD SELECT 'Not Delete';
CREATE
test=# DELETE FROM rrr WHERE id = 2;
DELETE 0
#


The RULE works (nothing is deleted), but where is a output from SELECT?

It's in 7.1 and 6.5 too. Is it right?  


					Karel


Thu, 17 Aug 2000 13:17:50 +0200 (CEST)
Karel Zak <zakkr@zf.jcu.cz>
right RULE?