I was trying to create a rule to set a column to false whenever another
column was changed:

CREATE RULE...
ON UPDATE TO criterion
  WHERE new.pattern::text <> old.pattern::text DO UPDATE table SET flag =
false
 WHERE id = old.id

pattern | id
12345  | 1

=> update criterion set pattern = '12345' where id = 1;
ERROR:  infinite recursion detected in rules for relation "criterion"

I'm not sure why it's detecting recursion in this case when the rule
conditional should be false

Thanks for any help...
gene

Reply via email to